# JSON Schema Validator (x402 Offline Gate)

> JSON Schema Validator (x402 Offline Gate) is a paid API for AI agents from x402-v2-mint-json-schema-validate.vercel.app, paid per call via x402, $0.006/call, status unknown (last checked 2026-11-20).

Validates a JSON instance against a JSON Schema definition offline, checking type, required fields, properties, items, and formats — returning a pass/fail summary.

## Facts

- Endpoint: POST https://x402-v2-mint-json-schema-validate.vercel.app/v1/json-schema-validate?utm_source=zero.xyz
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-schema-validator-x402-offline-gate-1718458b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NLpRI3jhzwjE3SmiCjS_9

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-x402-offline-gate-1718458b -d '<json body>'
```

Example prompt: Can you check whether this JSON object passes its schema — the schema requires a 'name' string and an 'age' integer, and the instance I have is {"name": "Alice", "age": "thirty"} — I need to know if it validates or fails?

## When to prefer this

Choose this endpoint when you need a fast, offline (no external network calls), pay-per-use JSON Schema validation gate that checks type correctness, required fields, property definitions, array items, and format constraints without modifying or repairing the input. Ideal for agentic pipelines that need to enforce data contracts at runtime without bundling a local validation library, or when operating in an x402 payment-gated microservice architecture.

## Known failure modes

- Schema or instance missing from request body — returns validation error or 400
- Instance violates type constraints — ok: false with summary describing the type mismatch
- Required fields absent from instance — ok: false with summary listing missing properties
- Invalid format values (e.g. bad email, malformed date-time) — ok: false with format error detail
- Malformed schema object that cannot be parsed — may return error or unexpected result

## How this service works

Offline JSON Schema gate (type/required/properties/items + formats). Validate only — not schema-json-repair. Amp port.

## Output

Returns a JSON object with an 'ok' boolean (true if the instance is valid, false if not), a 'summary' string describing the validation outcome (e.g. 'ok' or an error description), a 'skill' identifier, and a 'charged' flag indicating the payment was processed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "schema": {
   "type": "object"
  },
  "instance": {},
  "request_id": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "json-schema-validate",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-schema-validator-x402-offline-gate-1718458b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-json-schema-validate.vercel.app](https://www.zero.xyz/host/x402-v2-mint-json-schema-validate.vercel.app/llms.txt)
