# agent402.tools JSON Schema Validator

> agent402.tools JSON Schema Validator is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Validates a JSON document against a JSON Schema (draft-07 subset) and returns a list of violations

## Facts

- Endpoint: POST https://agent402.tools/api/json-validate
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-json-schema-validator-67674cc4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i4Jc1zhrSnW2O5c7_9qc9

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 agent402-tools-json-schema-validator-67674cc4 -d '<json body>'
```

Example prompt: Check if this JSON object {"name": "Alice", "age": "thirty"} is valid against this schema: {"type": "object", "properties": {"name": {"type": "string"}, "age": {"type": "integer"}}, "required": ["name", "age"]} — and list any violations.

## When to prefer this

Use this endpoint when you need deterministic, rules-based JSON schema validation against draft-07 constraints including type, required, properties, items, enum, const, min/max, length, pattern, format, anyOf/allOf/oneOf/not, and additionalProperties. Prefer this over custom validation logic when you need a structured list of violations rather than a pass/fail result, or when validating API payloads, configuration files, or data contracts programmatically.

## Known failure modes

- Invalid or malformed JSON schema provided — endpoint may return a schema parsing error
- Data field missing from request body — validation cannot proceed without a value to check
- Unsupported JSON Schema keyword used outside the draft-07 subset — constraint silently ignored or error returned
- Network timeout or payment failure via x402 protocol — call not executed

## How this service works

Validate a JSON document against a JSON Schema (draft-07 subset) and get the list of violations. Supports type, required, properties, items, enum, const, min/max, length, pattern, format, anyOf/allOf/oneOf/not, additionalProperties. Deterministic - check an agent's structured output before you trust it.

## Output

A deterministic list of schema violations found in the submitted JSON document, including which constraints were violated (type mismatches, missing required fields, enum failures, pattern errors, etc.). Returns an empty violations list if the document is valid.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "the JSON value to check (any type)"
  },
  "schema": {
   "type": "object",
   "description": "a JSON Schema (draft-07 subset)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "errors": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-json-schema-validator-67674cc4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
