{"uid":"cap_xFoyCV8FRGep4_M6cm7c4","slug":"agentdiet-json-repair-272c4c5a","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://x402-audit.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_5qlBxZ75rGM4KkbT4xz8D","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_l4epNiyVqVFkoecwxNsZX","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 a valid, distilled JSON object with a compression ratio proof.","exampleAgentPrompt":"Can you fix this broken JSON for me? It has some missing brackets and unquoted keys: {name: 'Alice', age: 30, hobbies: ['reading', 'coding'}","exampleUseCases":[{"title":"Fix LLM-generated malformed JSON","prompt":"The AI response I got back has bad JSON — there are trailing commas and missing closing braces. Can you repair it and give me a clean valid JSON object? Here's the raw string: {\"user\":\"Bob\",\"score\":42,\"tags\":[\"a\",\"b\",}"},{"title":"Recover corrupted API response","prompt":"I got a truncated JSON payload from an external API and it won't parse. Can you repair it and tell me the compression ratio? The raw JSON is: {\"id\":1001,\"status\":\"active\",\"data\":{\"items\":[1,2,3"},{"title":"Sanitize LLM output before pipeline ingestion","prompt":"Before I feed this LLM-generated output into my data pipeline, can you clean up the malformed JSON so it's valid? Here it is: {\"report\": \"Q1 results\", \"values\": [10, 20, 30,], \"note\": 'needs review'}"}],"resultDescription":"Returns a JSON object with a 'status' field ('ok' on success), a 'data' field containing the repaired and valid JSON, and an 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%), indicating how much the raw input was cleaned or compressed.","failureModes":["Unparseable input — if the raw_json is so corrupted that no repair is possible, may return an error status","Missing required 'input' field — returns a schema validation error","Empty raw_json parameter — likely returns empty or error response","Input too large — may time out or return a processing error","Non-JSON input passed — unclear behavior, may attempt repair or fail gracefully"],"whenToPreferThis":"Use this endpoint when you have a malformed, truncated, or syntactically broken JSON string that needs to be repaired into a valid parseable object. It is especially useful for cleaning up LLM-generated JSON outputs, recovering from corrupted API responses, or sanitizing data before feeding it into a downstream pipeline. The compression ratio proof makes it useful when you also need to verify how much the payload was cleaned.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:34:59.445Z","isFirstParty":false,"canonicalSlug":"agentdiet-json-repair-272c4c5a"}