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

> JSON Schema Validator (draft-07 / 2020-12) is a paid API for AI agents from contract-api-production-c176.up.railway.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-15).

Validates up to 10 JSON documents against a provided JSON Schema (draft-07 or 2020-12) and returns per-document validity status with actionable error paths.

## Facts

- Endpoint: POST https://contract-api-production-c176.up.railway.app/v1/contracts/validate?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-schema-validator-draft-07-2020-12-51ef2672
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_37nEOZnEgG5DBivTSngpr

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-2020-12-51ef2672 -d '<json body>'
```

Example prompt: Validate these three JSON documents against my schema — use JSON Schema 2020-12 — and tell me which ones fail and exactly where the errors are.

## When to prefer this

Choose this endpoint when you need isolated, secure JSON Schema validation without any side effects, remote schema loading, or data mutation. It is ideal for enforcing API contract compliance, running CI/CD data quality gates, or batch-checking up to 10 documents in a single call. Prefer it over home-rolled validators when you need explicit draft-07 or 2020-12 support and structured error paths per document.

## Known failure modes

- More than 10 documents submitted — request rejected with validation error
- Invalid or unsupported schema draft value — returns error
- Schema references external URIs (remote $ref) — blocked, no remote loading
- Malformed JSON in request body — returns parse error
- Execution timeout if schema is extremely complex — bounded time limit enforced
- Memory limit exceeded for very large documents — request terminated

## How this service works

Validate up to ten JSON documents against JSON Schema draft-07 or 2020-12. Returns per-document validity and actionable errors with instance paths. Runs isolated with bounded time and memory; no remote schema loading or automatic data modification.

## Output

Returns a per-document validation report: for each submitted JSON document, the response indicates whether it is valid, and if not, lists actionable errors including the instance path (JSON Pointer) pointing to the exact failing location within the document.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "draft": {
   "enum": [
    "2020-12",
    "draft-07"
   ],
   "type": "string",
   "default": "2020-12"
  },
  "schema": {
   "anyOf": [
    {
     "type": "object",
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {}
    },
    {
     "type": "boolean"
    }
   ]
  },
  "documents": {
   "type": "array",
   "items": {},
   "maxItems": 10,
   "minItems": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-schema-validator-draft-07-2020-12-51ef2672/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from contract-api-production-c176.up.railway.app](https://www.zero.xyz/host/contract-api-production-c176.up.railway.app/llms.txt)
