{"uid":"cap_vpbnhbfTU6m5-XrkyJi4C","slug":"agentdiet-json-repair-endpoint-05ede931","name":"AgentDiet JSON Repair Endpoint","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://defi-yield.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_nvGndudUcAzOR2EDaxGpA","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_7SU9JfzYwDdV_ovoScqAM","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 or broken JSON strings, returning valid, corrected JSON with compression metadata.","exampleAgentPrompt":"Can you repair this broken JSON for me: '{\"name\": \"Alice\", \"age\": 30, \"city\": \"New York\"' — it's missing the closing brace and I need it to be valid JSON I can use downstream.","exampleUseCases":[{"title":"Fix LLM-generated malformed JSON","prompt":"The language model returned this JSON but it has syntax errors and won't parse — can you clean it up and give me a valid version: '{\"results\": [{\"id\": 1, \"value\": \"foo\", \"tags\": [\"a\", \"b\"}'?"},{"title":"Recover truncated API response JSON","prompt":"I got a truncated JSON response from an external API and it's broken: '{\"status\": \"ok\", \"data\": {\"items\": [1, 2, 3' — can you repair it so I can extract the data inside?"},{"title":"Clean up config file with JSON errors","prompt":"My config file has invalid JSON with missing quotes and trailing commas — here it is: '{name: myApp, version: \"1.0\", debug: true,}' — please fix it so it's valid JSON."}],"resultDescription":"Returns a JSON object with a 'data' field containing the repaired and valid JSON, a 'status' field (e.g. 'ok'), and an 'roi_proof' object containing compression metadata such as compression_ratio_pct indicating how much the input was compacted or corrected.","failureModes":["Input JSON is so severely malformed that repair is not possible — returns error status","Missing required 'input' parameter causes validation failure","Unsupported HTTP method specified in 'method' field","Empty or null raw_json query parameter results in no-op or error","Network timeout or upstream service unavailability"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call JSON repair service that returns corrected JSON along with compression/repair metrics. It is especially useful in agentic pipelines where LLM outputs, API responses, or user-supplied data may contain malformed JSON that must be sanitized before further processing. Prefer this over manual regex-based fixes or client-side parsing hacks when you need reliable structured output with minimal latency.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:39:05.291Z","isFirstParty":false,"canonicalSlug":"agentdiet-json-repair-endpoint-05ede931"}