# Agent Data Toolkit – JSON Repair

> Agent Data Toolkit – JSON Repair is a paid API for AI agents from agent-data-toolkit.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Repairs malformed JSON (truncated, single-quoted, trailing commas, LLM output artifacts) into valid, parseable JSON.

## Facts

- Endpoint: POST https://agent-data-toolkit.onrender.com/repair
- 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/agent-data-toolkit-json-repair-91014ef4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gkuTwbZyl0fgxJ7upxjS2

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 agent-data-toolkit-json-repair-91014ef4 -d '<json body>'
```

Example prompt: This JSON I got back from the LLM is broken — it has single quotes, a trailing comma, and a truncated array. Can you repair it into valid JSON: {name: 'Alice', scores: [10, 20,}

## When to prefer this

Use this endpoint when you have JSON that fails JSON.parse() due to common issues like LLM output artifacts, single quotes, trailing commas, or truncation. Ideal for post-processing LLM-generated structured data before storage or further processing. Prefer this over manual regex cleanup or writing custom parsers for each edge case.

## Known failure modes

- Input is so severely malformed that structure cannot be inferred — returns error indicating unrecoverable JSON
- Input is not JSON at all (e.g. plain text or binary) — returns error or empty result
- Ambiguous structure where multiple valid repairs are possible — may return best-guess repair
- Service cold-start latency on Render.com free tier — first request may time out after inactivity

## How this service works

Repair malformed JSON (truncated, single quotes, trailing commas, LLM output artifacts) into valid JSON.

## Output

Returns a valid, well-formed JSON object or array that has been corrected from the malformed input. Fixes issues including single quotes, trailing commas, truncated structures, unescaped characters, and other common LLM output artifacts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "broken"
     ],
     "properties": {
      "broken": {
       "type": "string",
       "description": "string, the malformed JSON text (required)"
      },
      "schema": {
       "type": "object",
       "description": "object, optional JSON Schema to validate the result against"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "required": [
      "ok"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "error": {
       "type": "string"
      },
      "worker": {
       "type": "string"
      },
      "repaired": {},
      "schema_error": {
       "type": "string"
      },
      "schema_valid": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-toolkit-json-repair-91014ef4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-toolkit.onrender.com](https://www.zero.xyz/host/agent-data-toolkit.onrender.com/llms.txt)
