# x402 JSON Schema Validate

> x402 JSON Schema Validate is a paid API for AI agents from x402-utils.558686.xyz, paid per call via x402, $0.0001/call, status unknown (last checked 2026-09-14).

Validates a JSON object against a provided JSON Schema definition and returns whether it is valid along with any validation errors.

## Facts

- Endpoint: POST https://x402-utils.558686.xyz/v1/tools/json-schema-validate
- Price: $0.0001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-json-schema-validate-3c09d857
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d0gezeecv5rH_ER_rSUgm

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-json-schema-validate-3c09d857 -d '<json body>'
```

Example prompt: Can you check whether this JSON object — {"name": "x402", "age": 5} — is valid against the schema that requires an object with a required string field called 'name'?

## When to prefer this

Choose this endpoint when you need a cheap ($0.002), deterministic, repeatable JSON Schema validation without spinning up an LLM or a heavier validation library. Ideal as a pre-flight gate in agent pipelines to catch bad data before expensive downstream calls. Best for validating structured JSON objects where you already have an explicit JSON Schema definition. Prefer it over LLM-based structure checking when you need reliable, schema-standard compliance results with an explicit error list.

## Known failure modes

- Malformed or unparseable JSON in 'data' or 'schema' fields causes a 400-level error
- Missing required 'name' field in the data object may return a validation failure rather than an API error
- Schema missing 'type', 'required', or 'properties' may cause unexpected validation behavior
- Network or service unavailability returns a 5xx error
- Payment of $0.002 USDC not provided or rejected results in a 402 Payment Required response

## How this service works

A compact x402 utility surface for agents that need cheap, repeatable non-LLM transformations before spending on heavier routes: CSV cleanup, JSON Schema checks, timestamp conversion, JWT decode, URL normalization, hashes, codecs, and text utilities.

## Output

Returns a JSON object containing: a boolean 'valid' indicating whether the input data conforms to the provided schema, an 'errors' array listing any validation violations (empty if valid), and a 'checkedFields' summary of which fields were evaluated. Also echoes back the tool name, input, and route for traceability.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "json-schema-validate",
  "input": {
   "data": {
    "name": "x402"
   },
   "schema": {
    "type": "object",
    "required": [
     "name"
    ],
    "properties": {
     "name": {
      "type": "string"
     }
    }
   }
  },
  "route": "/v1/tools/json-schema-validate",
  "result": {
   "valid": true,
   "errors": [],
   "checkedFields": "checkedFields_example"
  },
  "project": "x402-utility-tools",
  "deterministic": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-json-schema-validate-3c09d857/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-utils.558686.xyz](https://www.zero.xyz/host/x402-utils.558686.xyz/llms.txt)
