{"uid":"cap_vjybiUcSCuhf0N6hfCKMv","slug":"agentdiet-json-repair-endpoint-2cbc71a7","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://token-intel.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_q8ZPU9k0Yk0AYOeqbj612","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_jvNCx0eFLJb7tqZDaktvI","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 normalizes malformed or truncated JSON strings, returning cleaned, valid JSON with compression metadata.","exampleAgentPrompt":"This JSON string I got back from the API is broken and won't parse — can you run it through the AgentDiet JSON repair tool and give me back a valid, clean version? Here it is: {\"name\":\"Alice\",\"age\":30,\"city\":\"New York\"","exampleUseCases":[{"title":"Fix malformed LLM output JSON","prompt":"The JSON my language model returned is broken — it has unmatched brackets and missing quotes. Can you repair it so I can process it properly? Here's the raw string: {\"items\":[{\"id\":1,\"label\":\"foo\"},{\"id\":2,\"label\":\"bar\"}."},{"title":"Recover truncated API response","prompt":"I got a truncated JSON response from a third-party API and it's not parseable. Can you fix the JSON and return a valid object so I can extract the data fields from it? The broken JSON is: {\"results\":[{\"score\":0.95,\"name\":\"Widget A\"},{\"score\":0.87,\"name\":"},{"title":"Sanitize user-submitted JSON payload","prompt":"A user submitted this JSON form data but it has syntax errors and won't validate. Can you repair it and give me back clean, parseable JSON before I save it to the database? Here it is: {\"firstName\":\"Bob\",\"lastName\":\"Smith\",email:\"bob@example.com\"}"}],"resultDescription":"Returns a JSON object with a 'data' field containing the repaired, valid JSON structure, a 'status' field ('ok' on success), and a 'roi_proof' object containing a 'compression_ratio_pct' value indicating how much the input was cleaned/compressed during repair.","failureModes":["Input JSON is so severely corrupted that no valid structure can be inferred — returns error status","Missing required 'input' or 'method' fields in the request body — returns validation error","Network timeout or service unavailability — returns HTTP 5xx","Payment not provided or insufficient USDC — returns HTTP 402","Input string is empty or null — returns error or empty data object"],"whenToPreferThis":"Choose this endpoint when you need to programmatically repair malformed, truncated, or syntactically invalid JSON strings — especially output from LLMs, scraped web data, or broken API responses. It is distinct from a JSON validator (which only flags errors) because it actively corrects and returns fixed JSON. Prefer it over manual regex-based fixes when the corruption is structural or unpredictable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:40:49.076Z","isFirstParty":false,"canonicalSlug":"agentdiet-json-repair-endpoint-2cbc71a7"}