{"uid":"cap_7FrQsJBwuhOY9OqqFA0yC","slug":"agentdiet-structured-output-context-window-distiller-265483c7","name":"AgentDiet Structured Output — Context Window Distiller","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/structured-output?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_DVvESiU2-fs5yvd6dXJ7e","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":"Compresses and distills JSON context/RAG data into a structured output, reducing token count by up to 85-91% while preserving semantic content.","exampleAgentPrompt":"Can you run my JSON context payload through AgentDiet's structured output distiller to compress it and tell me how much token reduction I get back?","exampleUseCases":[{"title":"LLM cost reduction for RAG pipeline","prompt":"I have a big RAG retrieval result in JSON — can you send it through AgentDiet's distiller to compress it down before I pass it to GPT-4? I want to see the compression ratio I get."},{"title":"Fitting context into a tight token budget","prompt":"My agent context window is almost full. Can you use AgentDiet to distill this JSON blob into a smaller structured output so it fits within my token limit without losing the key information?"},{"title":"A2A agent payload optimization","prompt":"Before my agent sends this context payload to the downstream agent, can you compress it with AgentDiet's structured output endpoint and give me back the de-bloated version along with the ROI proof?"}],"resultDescription":"Returns a JSON object with a 'data' field containing the compressed/structured output, a 'status' field ('ok'), and an 'roi_proof' object that includes a 'compression_ratio_pct' value showing how much the input was reduced (e.g. 91.4%).","failureModes":["Missing required 'input' field or invalid type/method values returns a validation error","Malformed raw_json query parameter may result in empty or unexpected output","Payment failure via x402/L402 protocol blocks execution if USDC balance is insufficient","Overly large or deeply nested JSON input may exceed processing limits","Network timeout if upstream RAG or distillation node is unavailable"],"whenToPreferThis":"Choose this endpoint when you need to deterministically compress a JSON context or RAG payload before feeding it to an LLM, especially when operating under tight token budgets or wanting to reduce LLM API costs. It is particularly well-suited for A2A or agent-to-LLM pipelines where structured output is needed and token efficiency matters. Prefer this over generic text summarization when your input is structured JSON and you need a provable compression ratio returned.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:41:48.092Z","isFirstParty":false,"canonicalSlug":"agentdiet-structured-output-context-window-distiller-265483c7"}