# x402 Utils – JSON Schema Validator

> x402 Utils – JSON Schema Validator is a paid API for AI agents from utils.kagurazaka.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Validates a JSON value against a JSON Schema (draft-07 / 2019-09) and returns a list of every validation error with its path and keyword

## Facts

- Endpoint: POST https://utils.kagurazaka.dev/v1/json-schema?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-utils-json-schema-validator-687d8d73
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P5WpiZV1tMU-z8BiZfpTR

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 x402-utils-json-schema-validator-687d8d73 -d '<json body>'
```

Example prompt: Can you validate this JSON object against my schema and tell me exactly which fields fail and why? The data is {"email": "not-an-email", "age": "thirty"} and the schema requires email to be a valid email format and age to be an integer.

## When to prefer this

Choose this endpoint when you need fast, safe JSON Schema validation with full error reporting and RE2-safe pattern evaluation, especially for untrusted schemas where regex denial-of-service is a concern. It supports draft-07 and 2019-09 keywords plus common format validators (email, uri, date-time). Prefer it over inline validation libraries when you want a hosted, pay-per-call service with no dependency management, or when running in an environment without a native JSON Schema library.

## Known failure modes

- Malformed JSON schema object causes a 400 or schema-parse error
- Missing 'data' or 'schema' fields in request body returns an error
- Unsupported JSON Schema keywords beyond draft-07/2019-09 may be silently ignored
- Complex RE2-incompatible regex patterns in schema 'pattern' keywords will fail or be rejected
- Very deeply nested data structures may hit processing limits
- Payment failure (402) if USDC balance is insufficient

## How this service works

Validate a JSON value against a JSON Schema (draft-07 and 2019-09 keywords, formats such as email, uri, date-time) and list every error with its path. Patterns run on RE2, so a schema cannot stall the check.

## Output

Returns a JSON object with a 'valid' boolean, an 'errors' array where each entry includes the JSON path (e.g. '/email'), the failing keyword (e.g. 'format', 'type', 'minimum'), and a human-readable message, plus an 'error_count' integer. If the data passes all schema constraints, 'valid' is true and 'errors' is empty.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "the JSON value to check"
  },
  "schema": {
   "type": "object",
   "description": "the JSON Schema"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": false,
  "errors": [
   {
    "path": "/email",
    "keyword": "format",
    "message": "must match format \"email\""
   }
  ],
  "error_count": 1
 }
}
```

## More

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