ArthurAI Default Validation API
Endpoints to validate prompt and response on default rules
Endpoints to validate prompt and response on default rules
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/arthurai-default-validation-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: Arthur GenAI Engine Agent Discovery Default Validation API
version: 2.1.688
description: Endpoints to validate prompt and response on default rules
servers:
- url: https://platform.arthur.ai/api
description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Default Validation
description: Endpoints to validate prompt and response on default rules
paths:
/api/v2/validate_prompt:
post:
tags:
- Default Validation
summary: Default Validate Prompt
description: '[Deprecated] Validate a non-task related prompt based on the configured default rules.'
operationId: default_validate_prompt_api_v2_validate_prompt_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PromptValidationRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationResult'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
deprecated: true
security:
- API Key: []
/api/v2/validate_response/{inference_id}:
post:
tags:
- Default Validation
summary: Default Validate Response
description: '[Deprecated] Validate a non-task related generated response based on the configured default rules. Inference ID corresponds to the previously validated associated prompt’s inference ID. Must provide context if a Hallucination Rule is an enabled default rule.'
operationId: default_validate_response_api_v2_validate_response__inference_id__post
deprecated: true
security:
- API Key: []
parameters:
- name: inference_id
in: path
required: true
schema:
type: string
format: uuid
title: Inference Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseValidationRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationResult'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
PromptValidationRequest:
properties:
prompt:
type: string
title: Prompt
description: Prompt to be validated by GenAI Engine
conversation_id:
anyOf:
- type: string
- type: 'null'
title: Conversation Id
description: The unique conversation ID this prompt belongs to. All prompts and responses from this conversation can later be reconstructed with this ID.
user_id:
anyOf:
- type: string
- type: 'null'
title: User Id
description: The user ID this prompt belongs to
type: object
required:
- prompt
title: PromptValidationRequest
ValidationResult:
properties:
inference_id:
anyOf:
- type: string
- type: 'null'
title: Inference Id
description: ID of the inference
rule_results:
anyOf:
- items:
$ref: '#/components/schemas/ExternalRuleResult'
type: array
- type: 'null'
title: Rule Results
description: List of rule results
user_id:
anyOf:
- type: string
- type: 'null'
title: User Id
description: The user ID this prompt belongs to
model_name:
anyOf:
- type: string
- type: 'null'
title: Model Name
description: The model name and version used for this validation (e.g., 'gpt-4', 'gpt-3.5-turbo', 'claude-3-opus', 'gemini-pro').
type: object
title: ValidationResult
example:
inference_id: 4dd1fae1-34b9-4aec-8abe-fe7bf12af31d
rule_results:
- id: 90f18c69-d793-4913-9bde-a0c7f3643de0
name: PII Check
result: Pass
- id: 946c4a44-b367-4229-84d4-1a8e461cb132
name: Sensitive Data Check
result: Pass
PIIDetailsResponse:
properties:
score:
anyOf:
- type: boolean
- type: 'null'
title: Score
message:
anyOf:
- type: string
- type: 'null'
title: Message
pii_entities:
items:
$ref: '#/components/schemas/PIIEntitySpanResponse'
type: array
title: Pii Entities
type: object
required:
- pii_entities
title: PIIDetailsResponse
RuleResultEnum:
type: string
enum:
- Pass
- Fail
- Skipped
- Unavailable
- Partially Unavailable
- Model Not Available
title: RuleResultEnum
ExternalRuleResult:
properties:
id:
type: string
title: Id
description: ' ID of the rule'
name:
type: string
title: Name
description: Name of the rule
rule_type:
$ref: '#/components/schemas/RuleType'
description: Type of the rule
scope:
$ref: '#/components/schemas/RuleScope'
description: Scope of the rule. The rule can be set at default level or task level.
result:
$ref: '#/components/schemas/RuleResultEnum'
description: Result if the rule
latency_ms:
type: integer
title: Latency Ms
description: Duration in millisesconds of rule execution
details:
anyOf:
- $ref: '#/components/schemas/KeywordDetailsResponse'
- $ref: '#/components/schemas/RegexDetailsResponse'
- $ref: '#/components/schemas/HallucinationDetailsResponse'
- $ref: '#/components/schemas/PIIDetailsResponse'
- $ref: '#/components/schemas/ToxicityDetailsResponse'
- $ref: '#/components/schemas/BaseDetailsResponse'
- type: 'null'
title: Details
description: Details of the rule output
type: object
required:
- id
- name
- rule_type
- scope
- result
- latency_ms
title: ExternalRuleResult
example:
id: 90f18c69-d793-4913-9bde-a0c7f3643de0
name: PII Rule
result: Pass
RegexSpanResponse:
properties:
matching_text:
type: string
title: Matching Text
description: The subtext within the input string that matched the regex rule.
pattern:
anyOf:
- type: string
- type: 'null'
title: Pattern
description: Pattern that yielded the match.
type: object
required:
- matching_text
title: RegexSpanResponse
ResponseValidationRequest:
properties:
response:
type: string
title: Response
description: LLM Response to be validated by GenAI Engine
context:
anyOf:
- type: string
- type: 'null'
title: Context
description: Optional data provided as context for the validation.
model_name:
anyOf:
- type: string
- type: 'null'
title: Model Name
description: The model name and version being used for this response (e.g., 'gpt-4', 'gpt-3.5-turbo', 'claude-3-opus', 'gemini-pro').
type: object
required:
- response
title: ResponseValidationRequest
PIIEntityTypes:
type: string
enum:
- CREDIT_CARD
- CRYPTO
- DATE_TIME
- EMAIL_ADDRESS
- IBAN_CODE
- IP_ADDRESS
- NRP
- LOCATION
- PERSON
- PHONE_NUMBER
- MEDICAL_LICENSE
- URL
- US_BANK_NUMBER
- US_DRIVER_LICENSE
- US_ITIN
- US_PASSPORT
- US_SSN
title: PIIEntityTypes
HallucinationDetailsResponse:
properties:
score:
anyOf:
- type: boolean
- type: 'null'
title: Score
message:
anyOf:
- type: string
- type: 'null'
title: Message
claims:
items:
$ref: '#/components/schemas/HallucinationClaimResponse'
type: array
title: Claims
type: object
required:
- claims
title: HallucinationDetailsResponse
ToxicityDetailsResponse:
properties:
score:
anyOf:
- type: boolean
- type: 'null'
title: Score
message:
anyOf:
- type: string
- type: 'null'
title: Message
toxicity_score:
anyOf:
- type: number
- type: 'null'
title: Toxicity Score
toxicity_violation_type:
$ref: '#/components/schemas/ToxicityViolationType'
additionalProperties: false
type: object
required:
- toxicity_violation_type
title: ToxicityDetailsResponse
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
ToxicityViolationType:
type: string
enum:
- benign
- harmful_request
- toxic_content
- profanity
- unknown
title: ToxicityViolationType
RuleType:
type: string
enum:
- KeywordRule
- ModelHallucinationRuleV2
- ModelSensitiveDataRule
- PIIDataRule
- PromptInjectionRule
- RegexRule
- ToxicityRule
title: RuleType
BaseDetailsResponse:
properties:
score:
anyOf:
- type: boolean
- type: 'null'
title: Score
message:
anyOf:
- type: string
- type: 'null'
title: Message
type: object
title: BaseDetailsResponse
PIIEntitySpanResponse:
properties:
entity:
$ref: '#/components/schemas/PIIEntityTypes'
span:
type: string
title: Span
description: The subtext within the input string that was identified as PII.
confidence:
anyOf:
- type: number
- type: 'null'
title: Confidence
description: Float value representing the confidence score of a given PII identification.
type: object
required:
- entity
- span
title: PIIEntitySpanResponse
RegexDetailsResponse:
properties:
score:
anyOf:
- type: boolean
- type: 'null'
title: Score
message:
anyOf:
- type: string
- type: 'null'
title: Message
regex_matches:
items:
$ref: '#/components/schemas/RegexSpanResponse'
type: array
title: Regex Matches
description: Each string in this list corresponds to a matching span from the input text that matches the configured regex rule.
default: []
additionalProperties: false
type: object
title: RegexDetailsResponse
KeywordSpanResponse:
properties:
keyword:
type: string
title: Keyword
description: The keyword from the rule that matched within the input string.
type: object
required:
- keyword
title: KeywordSpanResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
RuleScope:
type: string
enum:
- default
- task
title: RuleScope
HallucinationClaimResponse:
properties:
claim:
type: string
title: Claim
valid:
type: boolean
title: Valid
reason:
type: string
title: Reason
order_number:
anyOf:
- type: integer
- type: 'null'
title: Order Number
description: This field is a helper for ordering the claims
default: -1
type: object
required:
- claim
- valid
- reason
title: HallucinationClaimResponse
KeywordDetailsResponse:
properties:
score:
anyOf:
- type: boolean
- type: 'null'
title: Score
message:
anyOf:
- type: string
- type: 'null'
title: Message
keyword_matches:
items:
$ref: '#/components/schemas/KeywordSpanResponse'
type: array
title: Keyword Matches
description: Each keyword in this list corresponds to a keyword that was both configured in the rule that was run and found in the input text.
default: []
additionalProperties: false
type: object
title: KeywordDetailsResponse
securitySchemes:
API_Key:
type: http
description: Bearer token authentication with an API key
scheme: bearer