# Reliable JSON — Deterministic Repair & Schema Validation

> Reliable JSON — Deterministic Repair & Schema Validation is a paid API for AI agents from agent-json-reliability.onrender.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-03).

Repairs malformed JSON and validates it against a JSON Schema, returning the corrected object and validation status deterministically.

## Facts

- Endpoint: POST https://agent-json-reliability.onrender.com/v1/json/reliable?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/reliable-json-deterministic-repair-schema-validation-fd460391
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2aPauKsrmf7Bn2zYEy6rL

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 reliable-json-deterministic-repair-schema-validation-fd460391 -d '<json body>'
```

Example prompt: The LLM returned this JSON but it has syntax errors and I need it to match my schema — can you repair it and validate it: '{"name":"alice","age":"30",}' against the schema {"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}}}?

## When to prefer this

Choose this endpoint when you need deterministic, reliable JSON repair and schema validation in a single call — especially in AI agent pipelines where LLM outputs frequently contain syntax errors like trailing commas, unquoted keys, or type mismatches. Prefer this over manual parsing when you need both repair and schema compliance confirmed atomically.

## Known failure modes

- Input JSON is so severely malformed it cannot be repaired — returns error or unrecoverable state
- JSON Schema itself is invalid — validation step may error or behave unexpectedly
- Payment of 0.003 USDC via x402 on Base fails — request is rejected with 402
- Large or deeply nested JSON may exceed size limits or cause timeout

## How this service works

Deterministic JSON repair and JSON Schema validation for AI agents. Free MCP, inspect, validate, repair. Paid POST /v1/json/reliable 0.003 USDC via x402 on Base.

## Output

Returns the repaired JSON object, a boolean 'repaired' flag indicating whether changes were made, a 'valid_final' boolean confirming the output passes schema validation, and a 'valid_original' boolean indicating whether the input was already valid before repair.

## Response schema (JSON Schema)

```json
{
 "example": {
  "json": {
   "age": 30,
   "name": "alice"
  },
  "repaired": true,
  "valid_final": true,
  "valid_original": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/reliable-json-deterministic-repair-schema-validation-fd460391/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-json-reliability.onrender.com](https://www.zero.xyz/host/agent-json-reliability.onrender.com/llms.txt)
