# JSON Schema Validator (draft-07 / 2019-09 / 2020-12)

> JSON Schema Validator (draft-07 / 2019-09 / 2020-12) is a paid API for AI agents from toolbelt402.tpoborne.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Validates a JSON data instance against a provided JSON Schema and returns exact error locations, keywords, and messages for programmatic handling.

## Facts

- Endpoint: POST https://toolbelt402.tpoborne.workers.dev/json/validate
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-schema-validator-draft-07-2019-09-2020-12-a2c78847
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4B2zYtX6ehLrpKqt9u-ZR

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability json-schema-validator-draft-07-2019-09-2020-12-a2c78847 -d '<json body>'
```

Example prompt: Can you validate this JSON object against my schema and tell me exactly which fields are invalid, using JSON Schema draft 2020-12? Here's the data: {"name": 123, "age": "thirty"} and here's the schema: {"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}},"required":["name","age"]}.

## When to prefer this

Choose this endpoint when you need deterministic, schema-driven validation of JSON data with precise error locations and keywords — especially when you need multi-draft support (draft-07, 2019-09, 2020-12) and structured, programmatically consumable error output. Prefer it over generic linting tools when exact JSON Pointer paths and schema keyword attribution matter, such as in CI pipelines, API gateway validation, or user-facing form error reporting.

## Known failure modes

- Invalid or unparseable JSON schema provided — returns a schema parse error
- Unknown draft version specified — returns an unsupported draft error
- Malformed request body with missing required fields (data or schema) — returns a 400-level error
- Network timeout on the workers.dev edge node — transient failure requiring retry
- Data instance is extremely large, potentially hitting payload size limits

## How this service works

Validate JSON data against a JSON Schema (draft-07, 2019-09, 2020-12) — returns exact error locations, keywords, and messages for programmatic handling. Deterministic schema validation.

## Output

Returns a structured validation result indicating whether the JSON data is valid against the provided schema, and if not, a list of errors each containing the exact instance path (JSON Pointer), the failing schema keyword, and a human-readable error message suitable for programmatic handling.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "Instance to validate"
  },
  "draft": {
   "type": "string",
   "description": "Optional: 7, 2019-09 or 2020-12 (default)"
  },
  "schema": {
   "type": "object",
   "description": "JSON Schema to validate against"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-schema-validator-draft-07-2019-09-2020-12-a2c78847/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolbelt402.tpoborne.workers.dev](https://www.zero.xyz/host/toolbelt402.tpoborne.workers.dev/llms.txt)
