$ man json-schema-validate
/json-schema-validate
PRICE / CALL
$0.003
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
wordmintCATEGORY
ai
STATUS
● live
NAME
json-schema-validate — json schema validator / json validator / structured-output verifier / contract checker
SYNOPSIS
POST https://x402.agentutility.ai/json-schema-validate
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
JSON Schema validator / JSON validator / structured-output verifier / contract checker. Validates any JSON document against any JSON Schema, draft-07 or 2020-12. Returns valid boolean, total error count, and per-error instance_path + schema_path + keyword + message. Powered by @cfworker/json-schema (MIT) — a spec-walker validator with built-in format keyword support (email / uri / date / uuid / etc.). Use this to check whether an LLM's structured output matches the spec you asked for, to validate an API response against your documented schema, or to add a verification gate to an agent pipeline. Pure compute, no upstream lookup. 200KB schema cap + 500KB data cap to keep CPU bounded.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| schema | object | The JSON Schema document. Max 200,000 chars when stringified. | required |
| data | any | The JSON data to validate. Any value. Max 500,000 chars when stringified. | required |
| draft | string | Schema draft: '2020-12' (default) or 'draft-07'. | optional |
| valid_only | boolean | If true, skips per-error detail and returns only { valid, draft, error_count }. Default false. | optional |
| formats | boolean | Enable format keyword (email, date, uri, uuid, etc.) via ajv-formats. Default true. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| valid | boolean | True when the data passed every constraint in the schema. |
| draft | string | Echo of which JSON Schema draft was used. |
| error_count | number | Total ajv errors raised before truncation. |
| truncated | boolean | True when error_count exceeded the 100-error cap and the errors array was trimmed. |
| errors | array | Per-error detail: instance_path (JSON pointer into the data), schema_path (JSON pointer into the schema), keyword (the constraint that failed), message (ajv's human-readable string), params (constraint-specific extras). Empty when valid_only is true. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/json-schema-validate \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# MCP packages on npm under # @agentutility/mcp-* (one per cluster) # # Catalog + install: # https://mcp.agentutility.ai # # Or call json-schema-validate directly over HTTP — see above.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- wordmintjson-schemavalidationschema-validateajvstructured-output
- methods
- POST
- cluster
- wordmint
- price
- $0.003 USDC per call
ADJACENT — other endpoints in wordmint
| endpoint | description | price |
|---|---|---|
| cron-next | Cron next fire times / cron forecaster / when does this cron run next / schedule preview / cadence calculator. | $0.003 |
| cron-explain | Cron expression explainer / cron parser / scheduling translator. | $0.002 |
| cron-parse | Cron parser. | $0.002 |
| dictionary-define | English dictionary / word definition / lookup word / pronunciation / part of speech / synonyms / etymology adjacent. | $0.002 |
| embedding-similarity | Embedding similarity / cosine similarity / semantic match / vector compare / are-these-strings-similar. | $0.002 |
| regex-test | Regex tester / pattern matcher / regex playground / verify-a-pattern / match-and-capture extractor. | $0.002 |
| semantic-chunk | Semantic chunker / text splitter / RAG chunker / chunking with overlap / sentence + paragraph aware. | $0.002 |
| text-embedding | Text embedding / vector embedding / semantic vector / Venice embeddings / Gemini embeddings / BGE-M3. | $0.002 |
SEE ALSO