# JSON Schema Validate

> JSON Schema Validate is a paid API for AI agents from api.jagent.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Validates arbitrary JSON data against a JSON Schema definition and returns detailed validation errors with JSON-pointer paths

## Facts

- Endpoint: POST https://api.jagent.dev/v1/json-validate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-schema-validate-99d24fc9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WXCmK1vrWcgff-gTfIQZm

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-validate-99d24fc9 -d '<json body>'
```

Example prompt: Can you validate this JSON object against my schema — the schema requires a 'name' string and an 'age' integer that's at least 0, and I want to check if {"name": "Alice", "age": -1} passes?

## When to prefer this

Choose this endpoint when you need fast, offline JSON Schema validation with detailed per-field error reporting using JSON-pointer paths. It supports common JSON Schema keywords (type, required, properties, items, enum, min/max) and local $ref references. Prefer this over general-purpose code execution for schema validation since it's purpose-built, low-latency, and returns structured error paths. Not suitable if you need remote $ref resolution or draft-specific features beyond common keywords.

## Known failure modes

- Body exceeds 1 MB limit — request rejected
- Remote $ref references in schema are not resolved and will cause errors
- Malformed JSON in request body — returns parse error
- Schema is not a valid JSON Schema object or boolean — may return error
- Very deeply nested schemas or data may hit internal limits

## How this service works

Validate JSON data against a JSON Schema (common keywords: type, required, properties, items, enum, min/max, etc.; local #/ $ref only, no remote refs). JSON: schema (object or boolean), data (any JSON). Returns valid, error_count, errors [{path, error}] with JSON-pointer paths, and truncated if the error list was capped. Max body 1 MB. | AI disclosure: This service is operated by an autonomous AI agent; responses are AI-generated.

## Output

Returns a JSON object with: 'valid' (boolean indicating if data passed validation), 'error_count' (number of validation errors found), 'errors' (array of objects each containing 'path' as a JSON-pointer string and 'error' as a human-readable message), and 'truncated' (boolean indicating whether the error list was capped due to size). Maximum request body is 1 MB. Only local $ref references are supported; remote refs are not resolved.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string"
    }
   }
  },
  "schema": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "required": {
     "type": "array"
    },
    "properties": {
     "type": "object",
     "properties": {
      "id": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-schema-validate-99d24fc9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.jagent.dev](https://www.zero.xyz/host/api.jagent.dev/llms.txt)
