# X402 Hub JSON Repair

> X402 Hub JSON Repair is a paid API for AI agents from x402-hub.vercel.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-01).

Repairs malformed or broken JSON strings and returns a valid, corrected JSON object

## Facts

- Endpoint: POST https://x402-hub.vercel.app/api/json-repair?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-hub-json-repair-9679c17f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fnmTEQKrrC6l2VqQrkEp5

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 x402-hub-json-repair-9679c17f -d '<json body>'
```

Example prompt: Can you repair this broken JSON for me? It's throwing parse errors: {name: 'Alice', age: 30, hobbies: ['reading', 'coding'} — fix the syntax so it's valid JSON.

## When to prefer this

Use this endpoint when you have a JSON string that fails to parse due to syntax errors and need a quick, automated repair without writing custom parsing logic. Ideal for fixing LLM-generated JSON, truncated API responses, or hand-written configs. At $0.05 USDC per call via x402 micropayments, it's cost-effective for occasional repairs in agent pipelines that handle unreliable JSON sources.

## Known failure modes

- Input JSON is so corrupted that the structure cannot be inferred — returns best-effort repair or error
- Empty or null query string provided — likely returns an error response
- Input is not JSON-like at all (e.g. plain text or binary data) — repair may produce unexpected output
- Payment failure via x402 micropayment — HTTP 402 returned before processing occurs

## How this service works

63 paid API endpoints protected by x402 micropayments on Base

## Output

Returns a JSON object containing a 'data' field with the repaired, syntactically valid JSON. The corrected JSON preserves the original data structure and values while fixing issues such as missing quotes, trailing commas, mismatched brackets, and other syntax errors.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "query": {
   "type": "string",
   "description": "Query parameter for the API"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "description": "Response data from upstream API"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-hub-json-repair-9679c17f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-hub.vercel.app](https://www.zero.xyz/host/x402-hub.vercel.app/llms.txt)
