{"uid":"cap_fV6fCS7DzQkPtMwjwxVhn","slug":"json-repair-api-fd583a57","name":"JSON Repair API","description":"Quality-scored paid utility APIs for AI agents over x402 on Base USDC.","url":"https://agent-utility-network.frosty-sound-4560.workers.dev/v1/paid/json-repair","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","description":"Malformed JSON text to repair."}}},"responseSchema":{"type":"json","example":{"result":{"repaired":{"hello":"world"}}}},"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_2J_itOnZe51XpUfveB5vN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Takes malformed or broken JSON text as input and returns a repaired, valid JSON object.","exampleAgentPrompt":"This JSON string I got back is broken and won't parse — can you repair it and give me back valid JSON? Here it is: {hello: 'world', missing_bracket: true","exampleUseCases":[{"title":"Fixing LLM-generated malformed JSON","prompt":"The AI model I'm using keeps returning JSON with unquoted keys and trailing commas — can you clean up this broken output and give me a valid JSON object I can actually parse? Here's what it returned: {name: John, age: 30, tags: ['a','b',]}"},{"title":"Recovering corrupted API response","prompt":"I received a JSON payload from an external API but it appears to be malformed — it has missing closing brackets and unescaped quotes. Can you repair this so I can use the data? Here it is: {\"user\":\"alice\", \"scores\":[10, 20, 30}"},{"title":"Sanitizing user-submitted JSON input","prompt":"A user submitted this JSON configuration but it has syntax errors — single quotes instead of double quotes and some missing commas. Can you fix it into valid JSON so I can process it? Here's the input: {'theme': 'dark' 'fontSize': 14 'enabled': true}"}],"resultDescription":"Returns a JSON object with a `result.repaired` field containing the corrected, fully valid JSON structure parsed from the malformed input text.","failureModes":["Input is so severely malformed that no valid JSON can be inferred — may return an error or best-effort partial repair","Non-JSON input (e.g. plain text, XML, CSV) may not be repairable","Empty input string returns an error","Ambiguous malformation where multiple valid repairs exist may produce unexpected results"],"whenToPreferThis":"Use this endpoint when you have a specific malformed JSON string that needs to be repaired programmatically — especially useful in agentic pipelines where LLMs or external APIs return syntactically invalid JSON that needs to be sanitized before further processing. Prefer this over manual string manipulation when the malformation type is unknown or complex.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:36:35.932Z","isFirstParty":false}