# 402utils JSON Schema Validator

> 402utils JSON Schema Validator is a paid API for AI agents from 402utils.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Validates any JSON value against a self-contained JSON Schema (drafts 2020-12, 2019-09, 7, 4) and returns per-failure error details with JSON Pointer paths

## Facts

- Endpoint: POST https://402utils.com/v1/json-validate?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-json-schema-validator-83676692
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__5HE6bVRA04IWdKYAK7_g

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 402utils-json-schema-validator-83676692 -d '<json body>'
```

Example prompt: Before I store this tool-call response, check whether it's valid against this JSON Schema — run it through the JSON Schema validator and tell me if there are any errors, including which fields fail and why: data is {"name":"Alice","age":"thirty"} and the schema requires name as string and age as integer.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically verify that structured data — such as tool-call outputs, API responses, or user-submitted JSON — conforms to a known JSON Schema before acting on it. It supports multiple JSON Schema drafts (2020-12 default, 2019-09, 7, 4), returns granular per-field errors with JSON Pointer paths, and runs in an eval-less environment safe for edge/worker deployments. Prefer it over client-side Ajv when you cannot run eval in your environment, or when you want a paid, logged, auditable validation call.

## Known failure modes

- Remote $ref in schema is refused — only local #... references are allowed; returns an error indicating remote refs are not supported
- Unsafe or exponential-backtracking regex patterns in schema are rejected before compilation
- Malformed JSON in request body causes a parse error response
- Unsupported $schema draft version may fall back to default (2020-12) or return an error
- Missing 'data' or 'schema' fields in the request body may return a validation or bad-request error
- Payment not included or insufficient USDC triggers x402 payment-required response

## How this service works

Validate a JSON value against a JSON Schema (draft 2020-12 default; 2019-09/7/4 via $schema). Send {data, schema}; returns {valid, errors:[{path, message, keyword}]} with a JSON Pointer path per failure. For agents checking structured/tool-call output before use. Runs on an eval-less validator (Ajv can't run on Workers). Remote $ref is refused (self-contained only); unsafe regex patterns are rejected before compilation.

## Output

Returns a JSON object with a boolean 'valid' field and an 'errors' array. Each error entry contains a 'path' (JSON Pointer string indicating the failing location in the data), a 'message' describing the violation, and the 'keyword' that triggered it (e.g. 'type', 'required', 'minimum').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "The JSON value to validate (any type: object, array, string, number, boolean, null)."
  },
  "schema": {
   "type": "object",
   "description": "A self-contained JSON Schema. Only local #… $refs; no remote $ref."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-json-schema-validator-83676692/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
