{"uid":"cap_1hb-VdtTEeJUzDY-ZR4I9","slug":"defi-yield-agentdiet-dev-agentdiet-web-url-distiller-aee6a040","name":"AgentDiet Web URL Distiller","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://defi-yield.agentdiet.dev/api/diet)","url":"https://defi-yield.agentdiet.dev/api/diet?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","minLength":1,"description":"Target webpage URL to fetch and distill (or builtin://stripe-docs)"},"html":{"type":"string","description":"Optional raw HTML string to distill directly without fetching"},"mode":{"enum":["markdown","structured","skeleton","budget"],"type":"string","default":"markdown","description":"Distillation mode"},"query":{"type":"string","description":"BM25 focus query when mode=budget"},"max_tokens":{"type":"integer","minimum":20,"description":"Strict token budget ceiling when mode=budget"}}},"responseSchema":{"type":"object","required":["status","roi_proof","data"],"properties":{"data":{"type":"object","description":"Distilled Markdown, structured JSON tables/metadata, skeleton outline, or BM25 budget excerpt."},"cache":{"type":"object","properties":{"status":{"enum":["HIT","MISS"],"type":"string"},"cache_key":{"type":"string"},"latency_ms":{"type":"number"}}},"status":{"type":"string","description":"Execution status ('ok')"},"billing":{"type":"object","properties":{"agent_id":{"type":"string"},"payment_method":{"type":"string"},"fee_charged_usd":{"type":"number"}}},"roi_proof":{"type":"object","properties":{"raw_tokens":{"type":"integer"},"tokens_saved":{"type":"integer"},"roi_multiplier":{"type":"number"},"distilled_tokens":{"type":"integer"},"llm_cost_saved_usd":{"type":"number"},"compression_ratio_pct":{"type":"number"}}}}},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.001","displayCostAsset":"USD","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.001/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lIU9roouNI_1VkASuBqFD","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"defi-yield.agentdiet.dev","brandSlug":"defi-yield-agentdiet-dev-mpp","brandBaseUrl":"https://defi-yield.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a URL or raw HTML and compresses it into compact, agent-ready tokens using BM25 budget control and multiple distillation modes","exampleAgentPrompt":"Can you distill https://docs.stripe.com/payments/accept-a-payment into compact markdown, keeping it under 800 tokens and focusing on the payment flow steps?","exampleUseCases":[{"title":"LLM cost-efficient research pipeline","prompt":"Pull the content from https://openai.com/research/gpt-4 and distill it into budget mode with a max of 500 tokens, focusing on model capabilities — I want to minimize token usage in my pipeline."},{"title":"Structured data extraction from a landing page","prompt":"Fetch https://www.anthropic.com/product and return it in structured mode so I get clean JSON tables and metadata I can pass directly to my agent."},{"title":"Skeleton outline for quick navigation","prompt":"Give me a skeleton outline of https://docs.aws.amazon.com/lambda/latest/dg/welcome.html so I can see the document structure without reading the whole thing."}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled content (markdown, structured JSON, skeleton outline, or BM25 excerpt depending on mode), an 'roi_proof' object showing raw vs. distilled token counts, compression ratio, and estimated LLM cost saved in USD, plus optional cache hit/miss status and billing details.","failureModes":["URL is unreachable or returns non-200 status — endpoint may return an error status","URL requires authentication or JavaScript rendering — content may be incomplete or empty","max_tokens ceiling too low — may produce truncated or minimal output","BM25 query in budget mode returns no relevant matches — excerpt may be empty","Raw HTML field and URL both provided — behavior may be undefined or one takes precedence","Payment failure via x402 — request blocked with 402 status"],"whenToPreferThis":"Choose this endpoint when your agent needs to read web pages but must stay within strict token budgets or minimize LLM costs. It is especially valuable in agentic pipelines where multiple URLs need to be processed cheaply, or when you want BM25-focused excerpts rather than full-page content. Prefer it over raw HTTP fetching when you need automatic compression, structured extraction, or skeleton outlines without building your own HTML parser.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:10.483Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-agentdiet-web-url-distiller-aee6a040"}