# Vibes-Coded JSON Repair API

> Vibes-Coded JSON Repair API is a paid API for AI agents from vibes-coded.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Repairs malformed or broken JSON strings — fixing fences, trailing commas, smart quotes, and other common errors — returning parsed output with confidence score and list of corrections made.

## Facts

- Endpoint: POST https://vibes-coded.com/api/v1/outcomes/json-repair
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vibes-coded-json-repair-api-9be19889
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9E-tttbiCIguCTmNoEjBN

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 vibes-coded-json-repair-api-9be19889 -d '<json body>'
```

Example prompt: This JSON string from the LLM output is broken — it has a trailing comma and markdown code fences around it. Can you repair it and give me the parsed result along with what was fixed?

## When to prefer this

Choose this endpoint when you have LLM- or agent-generated JSON that fails to parse due to common formatting issues like markdown code fences, trailing commas, or smart quotes, and you need both the repaired object and an audit trail of what was changed. It is pay-per-call at $0.01 USDC via x402, making it cost-effective for occasional or high-volume JSON cleanup in automated pipelines. Prefer this over writing custom repair logic when you need confidence scoring and a structured list of corrections.

## Known failure modes

- Input is so corrupted it cannot be repaired — returns ok:false with confidence near 0
- Input is not JSON-like at all (e.g. plain prose) — service may return low confidence or error
- Network or payment failure — HTTP 402 if USDC payment not attached
- Ambiguous structure (e.g. multiple possible repairs) — confidence score will be low, parsed result may be best-guess only

## How this service works

Pay-per-call JSON for AI agents: skill search, listing optimization, install plans, productization, and artifact risk scoring. HTTP 402 → USDC. Full skill marketplace on-site.

## Output

Returns a JSON object with: `ok` (boolean success flag), `parsed` (the repaired and parsed JSON value), `confidence` (0–1 float indicating repair confidence), `valid_json` (boolean), and `errors_fixed` (array of human-readable strings describing each correction made, e.g. 'stripped ```json fence', 'removed trailing comma', 'smart quotes -> ascii').

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "parsed": {
   "name": "agent",
   "tools": [
    "search",
    "calc"
   ],
   "retries": 3
  },
  "confidence": 0.98,
  "valid_json": true,
  "errors_fixed": [
   "stripped ```json fence",
   "removed trailing comma",
   "smart quotes -> ascii"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vibes-coded-json-repair-api-9be19889/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from vibes-coded.com](https://www.zero.xyz/host/vibes-coded.com/llms.txt)
