{"uid":"cap_sJ3C02OQz4NGGeFWoNh3T","slug":"agentdiet-json-repair-bfe01588","name":"AgentDiet JSON Repair","description":"15-App Autonomous Business-to-Agent (B2A) API Hub & MCP Suite. Supports Web Distillation, On-Chain Risk, DEX Token Intelligence, B2B Lead Enrichment, Domain OSINT, Email Verification, SEC Filings, GitHub Audits, Prompt Firewall, and native HTTP 402 (x402 Base USDC).","url":"https://whale-momentum.agentdiet.dev/v1/json-repair?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","POST"],"type":"string"},"queryParams":{"type":"object","properties":{"raw_json":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":{},"status":"ok","roi_proof":{"compression_ratio_pct":91.4}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0TnrF8WPrACsPyQu9K4kT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_mO8zbTNWpLDFRPnfkXChd","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs and cleans malformed JSON strings, returning well-formed JSON with a compression ratio metric","exampleAgentPrompt":"Can you fix this broken JSON for me? It has some syntax errors and missing brackets: '{name: \"Alice\", age: 30, hobbies: [\"reading\", \"hiking\"'","exampleUseCases":[{"title":"Repairing LLM-generated malformed JSON","prompt":"The AI output I got back isn't valid JSON — it has extra commas and missing closing braces. Can you repair this for me so I can parse it properly: '{\"user\": \"bob\", \"score\": 42,, \"tags\": [\"vip\"}'"},{"title":"Recovering truncated API response JSON","prompt":"I received a truncated JSON response from another API that got cut off mid-stream. Can you repair it and return valid JSON? Here it is: '{\"results\": [{\"id\": 1, \"name\": \"item one\"}, {\"id\": 2, \"name\":'"},{"title":"Cleaning up user-submitted JSON config","prompt":"A user submitted a configuration file as JSON but it has single quotes, missing commas, and unquoted keys — can you repair it into valid JSON? Here's the raw input: '{name: \\'MyApp\\', version: 1 debug: true}'"}],"resultDescription":"Returns a JSON object with a 'status' field ('ok' on success), a 'data' field containing the repaired and well-formed JSON object, and a 'roi_proof' object that includes a 'compression_ratio_pct' metric indicating how much the input was cleaned up (e.g. 91.4%).","failureModes":["Input JSON is too severely corrupted to recover — returns error status","Missing required 'raw_json' query parameter — returns validation error","Input is not JSON at all (e.g. plain text or binary) — may return empty data or error","Network timeout on large malformed JSON inputs","Payment failure via x402 — returns HTTP 402 before processing"],"whenToPreferThis":"Use this endpoint when you have malformed, truncated, or syntactically broken JSON that needs to be repaired into valid parseable JSON. It is especially useful when processing LLM-generated JSON outputs, user-submitted configuration files, or partially received API responses. Prefer this over manual parsing logic when the corruption is non-trivial and you need a quick programmatic fix with minimal latency.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:34:16.925Z","isFirstParty":false,"canonicalSlug":"agentdiet-json-repair-bfe01588"}