{"uid":"cap_leUTvRTKQEx61IS0_JPMf","slug":"toll402-json-schema-validator-33db63ad","name":"Toll402 JSON Schema Validator","description":"Validate a JSON value against a JSON Schema subset (type, properties, required, enum, minimum/maximum, minLength/maxLength, items) and return errors","url":"https://toll402.dev/v1/t/json_schema_validate","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["schema","value"],"properties":{"value":{},"schema":{"type":"object"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VLwl687pkf4K6bLSkGnba","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a JSON value against a JSON Schema subset (type, properties, required, enum, minimum/maximum, minLength/maxLength, items) and returns structured validation errors","exampleAgentPrompt":"Check whether this JSON object {\"age\": -1, \"name\": \"\"} is valid against this schema: {\"type\": \"object\", \"required\": [\"age\", \"name\"], \"properties\": {\"age\": {\"type\": \"integer\", \"minimum\": 0}, \"name\": {\"type\": \"string\", \"minLength\": 1}}} and tell me exactly which fields fail and why.","exampleUseCases":[{"title":"API request body pre-flight check","prompt":"Before I send this user registration payload to our backend, validate it against our schema — required fields are 'email' and 'age', age must be at least 18, and email must be a string. Here's the value: {\"email\": \"\", \"age\": 15}."},{"title":"Config file integrity check","prompt":"I have a config JSON that should conform to our schema — 'mode' must be one of ['dev', 'staging', 'prod'], 'timeout' must be between 1 and 300, and both are required. Can you validate {\"mode\": \"production\", \"timeout\": 0} and list every violation?"},{"title":"LLM output schema enforcement","prompt":"I got this JSON back from a language model: {\"score\": 1.5, \"label\": \"maybe\"} and I need to check it against my schema where 'score' must be between 0 and 1 and 'label' must be one of ['positive', 'negative', 'neutral']. Tell me which fields are invalid."}],"resultDescription":"A structured response listing all validation errors found when checking the provided JSON value against the supplied schema. Each error identifies the offending field and the constraint violated (e.g. type mismatch, missing required property, value out of range, invalid enum value, string too short or too long, array item violation). If the value is fully valid, an empty error list or success indicator is returned.","failureModes":["Schema uses unsupported JSON Schema keywords beyond the supported subset (type, properties, required, enum, minimum, maximum, minLength, maxLength, items) — unsupported keywords may be silently ignored","Malformed schema object causes a processing error and no validation result is returned","Very deeply nested schemas or large payloads may exceed processing limits","Payment of 0.001 USDC not provided or x402 handshake fails — endpoint returns 402 Payment Required","Invalid request body structure (missing 'schema' or 'value' fields) returns a bad request error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call JSON Schema validation step without standing up a full validation library or service. It is ideal for agents validating LLM-generated JSON outputs, checking API request payloads before dispatch, or enforcing data contracts on dynamic user inputs. The supported subset (type, properties, required, enum, minimum/maximum, minLength/maxLength, items) covers the vast majority of practical validation needs. If you need full JSON Schema draft support including $ref, allOf/anyOf/oneOf, or complex conditionals, you may need a more complete validator.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:04:53.118Z","isFirstParty":false}