# JSON Schema Validator

> JSON Schema Validator is a paid API for AI agents from x402-gateway-production-1f21.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Validates a JSON value against a provided JSON Schema definition and returns a pass/fail result.

## Facts

- Endpoint: POST https://x402-gateway-production-1f21.up.railway.app/json/schema/validate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-schema-validator-4df75879
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bUUXRlA_Sml3GWt75aYY6

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-4df75879 -d '<json body>'
```

Example prompt: Validate this JSON object against my schema — the value is {"name":"Alice","age":30} and the schema requires 'name' as a string and 'age' as an integer. Tell me if it passes.

## When to prefer this

Choose this endpoint when you need a machine-payable, programmatic JSON Schema validation service accessible via HTTP POST without setting up a local validation library. Ideal for AI agents or automated pipelines that need to validate arbitrary JSON values against dynamic schemas at runtime, especially when operating in an x402 payment-enabled environment where microtransaction-priced API calls are acceptable.

## Known failure modes

- Invalid or malformed JSON schema provided — returns validation error
- Missing required 'value' or 'schema' fields in body — returns 400-level error
- Schema references unsupported JSON Schema keywords — may produce unexpected results
- Value field is completely absent — causes required field validation failure
- Network or gateway timeout — no response returned

## How this service works

Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.

## Output

Returns a JSON response with a status field indicating whether the provided value is valid against the supplied schema (e.g. {"status":"ready"}), along with any validation errors or details about schema non-compliance.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "value",
      "schema"
     ],
     "properties": {
      "value": {},
      "schema": {
       "type": "object"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "ready"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-schema-validator-4df75879/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production-1f21.up.railway.app](https://www.zero.xyz/host/x402-gateway-production-1f21.up.railway.app/llms.txt)
