Utilities
JSON Schema validation API
Validate a JSON value against a JSON Schema (Ajv, draft-07/2020-12) and get detailed errors (path, message, keyword). For agents producing or checking structured output. Pure compute. Answers 'validate this JSON against this schema', 'does this data match the schema', 'is this JSON valid per schema'.
Price$0.01per request
MethodPOST
Route/v1/util/json-validate
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
utiljson-schemavalidationajvschemastructured-outputvalidatejson
API URL
Integration docshttps://x402.hexl.dev/v1/util/json-validateExample request
{
"schema": {
"type": "object",
"required": [
"age"
],
"properties": {
"age": {
"type": "number"
}
}
},
"data": {
"age": "old"
}
}Example response
{
"valid": false,
"errorCount": 1,
"errors": [
{
"path": "/age",
"message": "must be number",
"keyword": "type",
"params": {
"type": "number"
}
}
]
}Input schema
{
"type": "object",
"required": [
"schema",
"data"
],
"properties": {
"schema": {
"type": "object",
"additionalProperties": true
},
"data": {}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}