# Toll402 JSON Repair

> Toll402 JSON Repair is a paid API for AI agents from toll402.dev, paid per call via x402, $0.00115/call, status unknown (last checked 2026-10-29).

Repairs malformed JSON text and returns a valid, corrected JSON string

## Facts

- Endpoint: POST https://toll402.dev/v1/x/ba15e020bb90?utm_source=zero.xyz
- Price: $0.00115/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toll402-json-repair-aab98e31
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A1hxL2CMycIckSWQWb9JN

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 toll402-json-repair-aab98e31 -d '<json body>'
```

Example prompt: Can you fix this broken JSON for me? It's got missing quotes and a trailing comma: {name: 'Alice', age: 30,}

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call JSON repair with no API key setup, especially within an agentic workflow that already uses x402/USDC payments on Base. It is ideal for fixing LLM-generated JSON, recovering corrupted API responses, or sanitizing user-submitted JSON configs without spinning up your own repair logic.

## Known failure modes

- Input is so severely malformed that no valid JSON can be inferred — returns an error or best-effort partial result
- Input is not JSON-like at all (e.g. plain text or XML) — repair may fail or produce nonsensical output
- Payment failure via x402 if wallet lacks sufficient USDC on Base — HTTP 402 response
- Network timeout or upstream gateway error from Toll402

## How this service works

The OpenRouter for AI-agent tools: one gateway, one wallet, every capability. Built-in tools, forged tools, a global verified business directory and 2,000+ aggregated x402 services, all paid per call in USDC via x402 (HTTP 402). No signup, no API key.

## Output

Returns a corrected, valid JSON string derived from the malformed input, with syntax errors such as trailing commas, single quotes, unquoted keys, missing brackets, and other common issues resolved.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "text"
 ],
 "properties": {
  "text": {
   "type": "string",
   "description": "The malformed JSON text to repair."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/toll402-json-repair-aab98e31/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toll402.dev](https://www.zero.xyz/host/toll402.dev/llms.txt)
