# JSON Schema Validator

> JSON Schema Validator is a paid API for AI agents from api.strale.io, paid per call via x402, $0.0216/call, status unknown (last checked 2026-10-09).

Validates a JSON object against a JSON Schema, returning detailed validation results with error paths and messages

## Facts

- Endpoint: GET https://api.strale.io/x402/json-schema-validate?utm_source=zero.xyz
- Price: $0.0216/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-d34704c1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pj2Z3SxR9yHOyZCX9jWKP

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 api-strale-io-d34704c1
```

Example prompt: Can you validate this JSON object {"name":"Alice","age":"thirty"} against this schema {"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}},"required":["name","age"]} and tell me exactly which fields fail and why?

## When to prefer this

Use this endpoint when you need programmatic JSON Schema validation with detailed error path reporting, especially for validating API payloads, configuration files, or structured data against Draft 2020-12 JSON Schema definitions. Prefer this over manual validation when you need machine-readable error locations.

## Known failure modes

- Missing required 'data' query parameter returns error
- Missing required 'schema' query parameter returns error
- Malformed JSON in data or schema fields causes parse error
- Invalid JSON Schema format causes schema compilation error
- Payment failure (402) if USDC payment not included
- Network timeout on large or complex schema evaluations

## How this service works

Validate a JSON object against a JSON Schema. Returns validation result with detailed error paths and messages. Algorithmic.

## Output

Returns a validation result indicating whether the JSON data is valid against the provided schema, along with detailed error paths (e.g. '$.age') and human-readable error messages for each validation failure, enabling precise debugging of schema non-conformance.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data",
      "schema"
     ],
     "properties": {
      "data": {
       "description": "JSON data to validate"
      },
      "schema": {
       "type": "object",
       "description": "JSON Schema to validate against"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-d34704c1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
