{"uid":"cap_nacJffU4XTV8ffFX0BNL2","slug":"bitbooth-json-repair-d6640ed0","name":"BitBooth JSON Repair","description":"BitBooth JSON Repair: take any almost-JSON string (LLM tool output, broken API response, etc.), fix the common errors (trailing commas, single quotes, unquoted keys, missing brackets), and optionally validate against a JSON Schema. Built for AI agents that wrap every tool call in defensive parsing. Pay 0.001 USDC per call, no API key, no subscription.","url":"https://app.heinrichstech.com/v1/cdp/json-repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["malformed"],"properties":{"schema":{"type":"object","description":"Optional JSON Schema to validate the repaired output against. AJV-compatible."},"malformed":{"type":"string","description":"The broken JSON string to repair."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nJUXOuKR6iIw9eAOkvKJr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fixes malformed JSON strings (trailing commas, single quotes, unquoted keys, missing brackets) and optionally validates against a JSON Schema, paying 0.001 USDC per call with no API key required.","exampleAgentPrompt":"This LLM response came back with malformed JSON — trailing commas, single-quoted strings, and an unquoted key. Can you run it through BitBooth JSON Repair and also validate it against my schema?","exampleUseCases":[{"title":"Fixing LLM tool call output","prompt":"My AI pipeline's tool-call response came back with trailing commas and single-quoted strings and it's crashing my parser. Can you fix this JSON for me: {name: 'Alice', age: 30,}"},{"title":"Schema validation after repair","prompt":"I have this broken JSON from a third-party API — it has missing brackets and unquoted keys. Fix it and then validate it against my JSON Schema to make sure it has the required fields: {\"type\":\"object\",\"required\":[\"id\",\"email\"]}."},{"title":"Defensive parsing in agentic workflow","prompt":"Before I pass this tool output downstream, I want you to repair any JSON errors in it and confirm it's valid — here's the raw string: {\"results\": [1, 2, 3,], \"status\": 'ok'}"}],"resultDescription":"Returns the repaired, valid JSON string along with a flag indicating whether the input required changes, details of what was fixed, and optionally a JSON Schema validation result including any schema errors found.","failureModes":["Input is so malformed it cannot be parsed even heuristically — returns error with description of unparseable content","Provided JSON Schema is itself invalid — returns schema parse error","Input is not JSON-like at all (e.g. plain text or binary) — returns cannot-repair error","Payment of 0.001 USDC fails or is insufficient — returns payment error","Rate limiting or server error — returns 5xx with error message"],"whenToPreferThis":"Choose this endpoint when your agent receives JSON output from LLMs or third-party APIs that frequently contains common syntax errors like trailing commas, single quotes, or unquoted keys. It is ideal for defensive parsing pipelines where structured output cannot be trusted to be valid, especially when you also need JSON Schema validation in the same call. At $0.001 per call with no API key, it is suitable for high-frequency agentic workflows. Prefer it over rolling your own regex-based fixer when you need reliable, schema-aware repair.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T00:31:59.651Z","isFirstParty":false,"canonicalSlug":"bitbooth-json-repair-d6640ed0"}