# JSON Auto-Fix API

> JSON Auto-Fix API is a paid API for AI agents from river-guestbook-newark-fails.trycloudflare.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-16).

Repairs malformed JSON by fixing trailing commas, single quotes, and unquoted keys, returning only valid JSON.

## Facts

- Endpoint: POST https://river-guestbook-newark-fails.trycloudflare.com/v1/json-fix?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-auto-fix-api-7ca5e83c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oFsUwQEYVj88QKiuqEMjr

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-auto-fix-api-7ca5e83c -d '<json body>'
```

Example prompt: I have some broken JSON that has trailing commas and single quotes instead of double quotes — can you fix it and give me back valid JSON?

## When to prefer this

Choose this endpoint when you need a fast, cheap ($0.005 per call) automated fix for common JSON syntax errors like trailing commas, single quotes, or unquoted keys — especially useful in pipelines where LLM-generated or user-provided JSON is frequently malformed and needs to be made parseable before further processing.

## Known failure modes

- JSON too malformed to repair — returns error if structure is unrecoverable
- Input is not JSON-like at all — may return validation error
- Ambiguous single-quote vs apostrophe context may lead to incorrect repair
- Empty input returns error
- Network timeout on Cloudflare tunnel if service is unavailable

## How this service works

Fix broken JSON (trailing commas, single quotes, unquoted keys). Returns only valid JSON.

## Output

A valid, corrected JSON object or array with all syntax errors resolved — trailing commas removed, single quotes replaced with double quotes, and unquoted keys properly quoted.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "usage": {
   "type": "object"
  },
  "choices": {
   "type": "array"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-auto-fix-api-7ca5e83c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from river-guestbook-newark-fails.trycloudflare.com](https://www.zero.xyz/host/river-guestbook-newark-fails.trycloudflare.com/llms.txt)
