{"uid":"cap_Mio-6H6Ubw1KbrVwX9-DZ","slug":"json-schema-validator-60bcd035","name":"JSON Schema Validator","description":"Validate a JSON instance against a JSON Schema (draft 7 / 2020-12 subset); returns a valid flag plus per-field errors with codes and JSONPath.","url":"https://api.24klabs.ai/api/jsonschema-validate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"schema":{"type":"object"},"instance":{"type":"object"}}},"responseSchema":{"type":"json","example":{"valid":true,"errors":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QPpAd6jbliofvWmLRm3W_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a JSON instance against a JSON Schema (draft 7 / 2020-12 subset) and returns a valid flag with per-field error codes and JSONPath locations.","exampleAgentPrompt":"Check whether this JSON object is valid against my JSON Schema and tell me exactly which fields fail and why, with their JSONPath locations: schema is {\"type\":\"object\",\"required\":[\"name\",\"age\"],\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"integer\",\"minimum\":0}}}, instance is {\"name\":\"Alice\",\"age\":-5}.","exampleUseCases":[{"title":"API payload pre-flight check","prompt":"Before I send this request body to the payments API, validate it against this JSON Schema and show me any fields that are missing or have the wrong type, with their JSONPath locations."},{"title":"Config file compliance audit","prompt":"I have a JSON config file for my app and a strict JSON Schema it must conform to — can you run validation and give me a list of every error with error codes and the exact path to each broken field?"},{"title":"Form submission data verification","prompt":"My form collected this JSON from a user. Run it against our draft-7 JSON Schema and tell me if it passes validation or which specific fields are invalid so I can show the right error messages."}],"resultDescription":"Returns a boolean 'valid' flag indicating overall pass/fail, plus an array of per-field error objects each containing an error code, a human-readable message, and a JSONPath expression pointing to the exact location of the violation within the JSON instance.","failureModes":["Malformed JSON instance causes parse error before validation begins","Invalid or unparseable JSON Schema document returns schema parse error","Schema uses features outside draft 7 / 2020-12 subset, leading to partial or incorrect validation","Very large or deeply nested documents may time out or return a payload-too-large error","Missing required request fields (instance or schema) returns a 400 bad request"],"whenToPreferThis":"Choose this endpoint when you need programmatic, structured validation of a JSON document against a formal JSON Schema with per-field JSONPath error reporting — especially useful in agent pipelines that need to gate on data quality before downstream processing, or when debugging exactly which fields violate which constraints. Prefer it over generic JSON linting tools when you need schema-driven type/format/required-field enforcement rather than syntax checking alone.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:57:44.264Z","isFirstParty":false}