# DeFi Intel Agent Gateway – JSON Repair

> DeFi Intel Agent Gateway – JSON Repair is a paid API for AI agents from defi-intel-agent-gateway.gg-neo15.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Repairs malformed JSON output from LLMs using deterministic Zod-validated cleanup, returning valid structured JSON for $0.001 USDC per call via x402.

## Facts

- Endpoint: POST https://defi-intel-agent-gateway.gg-neo15.workers.dev/v1/code/json-repair
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-intel-agent-gateway-json-repair-67d4c114
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_afOqVSG_eGcpyyptxVA3K

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 defi-intel-agent-gateway-json-repair-67d4c114 -d '<json body>'
```

Example prompt: The LLM just returned some broken JSON that won't parse — can you run it through the JSON repair service to clean it up and get me back a valid JSON object?

## When to prefer this

Choose this endpoint when you need a cheap, deterministic, no-auth fix for malformed JSON produced by LLMs or pipelines. It is ideal for agentic workflows where LLM outputs are unpredictable and downstream systems require valid JSON. Prefer it over custom parsing logic when you want reliable Zod-schema validation at $0.001/call without managing API keys.

## Known failure modes

- Input JSON too corrupted to repair — returns error indicating unrecoverable structure
- Payment not included or insufficient — x402 payment required error
- Invalid HTTP method — only POST, PUT, PATCH accepted
- Body type mismatch — bodyType enum must be json, form-data, or text
- Daily free sample quota exhausted — payment required

## How this service works

Repair malformed JSON produced by LLMs using deterministic Zod-validated cleanup — $0.001 USDC/call on eip155:8453. Pay-per-call via x402 — no API key, no account. Free samples daily.

## Output

A valid, Zod-validated JSON object that has been deterministically cleaned from the malformed input. The response contains the repaired JSON structure, ready for downstream consumption without further parsing errors.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-intel-agent-gateway-json-repair-67d4c114/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-intel-agent-gateway.gg-neo15.workers.dev](https://www.zero.xyz/host/defi-intel-agent-gateway.gg-neo15.workers.dev/llms.txt)
