{"uid":"cap_YA8Sy6NaKwRbL85RGtpey","slug":"agentdiet-rag-repair-endpoint-83132ca2","name":"AgentDiet RAG Repair Endpoint","description":"Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.","url":"https://rag-diet.agentdiet.dev/v1/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"}]},"paymentMethods":[{"uid":"pm_PUeCxTCG3CcZ0171-Tc3O","protocol":"x402","methodType":"crypto","chain":"base","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 validates raw JSON context windows to remove bloat and structural errors, returning compressed, agent-ready output with a compression ratio proof.","exampleAgentPrompt":"Take this raw JSON blob I got from my RAG retrieval and repair it — fix any structural issues and compress it as much as possible so I can fit it into my context window without wasting tokens.","exampleUseCases":[{"title":"Compressing bloated RAG retrieval output","prompt":"I just got a huge JSON response from my retrieval system and it's eating up my entire context window. Can you repair and compress it so I can actually use it in my next LLM call?"},{"title":"Fixing malformed tool call JSON","prompt":"My agent's tool call returned some broken JSON that I can't parse. Run it through the repair endpoint to fix the structure and slim it down before I pass it to the next step."},{"title":"Reducing token cost in A2A pipelines","prompt":"We're chaining multiple agents together and the context payload keeps growing. Can you distill and repair this JSON so it's compact and valid before passing it downstream?"}],"resultDescription":"Returns a JSON object with a 'data' field containing the repaired and compressed content, a 'status' field confirming success, and a 'roi_proof' object that includes the compression_ratio_pct (e.g. 91.4%) demonstrating how much the payload was reduced.","failureModes":["Missing or malformed 'input' field returns a 400-level error","Invalid 'type' value (must be 'http') causes schema validation failure","Unparseable raw_json query parameter may result in empty or error data response","Payment not settled in USDC on Base causes x402 payment-required rejection","Overly large payloads may exceed processing limits and return a timeout or size error"],"whenToPreferThis":"Choose this endpoint when you need to both repair malformed JSON and compress it for token efficiency in a single deterministic call, especially within A2A or MCP pipelines where context window size is a bottleneck. Prefer it over generic JSON validators when you also need token reduction with a measurable compression ratio proof. Best suited for agents that pay per call via x402/USDC and need a lightweight, fast repair pass before passing context to an LLM.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:42:03.903Z","isFirstParty":false,"canonicalSlug":"agentdiet-rag-repair-endpoint-83132ca2"}