{"uid":"cap_hf7_O85ti9R5-HE8NvikI","slug":"defi-yield-agentdiet-dev-web-url-context-distiller-bm25-budget-mode-d3c344c1","name":"Web URL Context Distiller (BM25 Budget Mode)","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/v1/context-diet)","url":"https://defi-yield.agentdiet.dev/v1/context-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_RL4Hii6-eiWvdzqHDj3Vy","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 distills it into compact, agent-ready tokens using markdown, structured, skeleton, or BM25-focused budget modes","exampleAgentPrompt":"Can you fetch https://docs.stripe.com/payments and distill it into a tight budget excerpt under 500 tokens, focused on 'payment intents', so I can fit it into my context window cheaply?","exampleUseCases":[{"title":"Slim down long docs for agent context","prompt":"Grab https://platform.openai.com/docs/guides/function-calling and distill it into markdown, keeping it under 800 tokens — I need the key points without burning my whole context window."},{"title":"Topic-focused excerpt from news article","prompt":"Distill this URL https://techcrunch.com/2025/01/15/openai-funding into a budget excerpt with max 300 tokens, focused on 'valuation and investors' — just the financially relevant parts."},{"title":"Structured data extraction from product page","prompt":"Fetch https://aws.amazon.com/ec2/pricing/ and distill it into structured mode so I get the pricing tables and metadata as clean JSON rather than a wall of HTML."}],"resultDescription":"Returns a distilled payload containing the webpage content in the requested format (markdown, structured JSON, skeleton outline, or BM25-focused budget excerpt), plus an roi_proof object showing raw token count, distilled token count, tokens saved, compression ratio percentage, estimated LLM cost saved in USD, and ROI multiplier. Also includes cache hit/miss status and billing details.","failureModes":["URL unreachable or returns non-200 — fetch fails with error status","URL behind authentication wall — returns empty or login-page content instead of target content","max_tokens set below minimum of 20 — rejected with validation error","BM25 query provided without mode=budget — query ignored or error returned","Raw HTML payload too large — may hit size limits","Payment not completed via x402 — 402 response requiring micropayment before content is returned"],"whenToPreferThis":"Choose this endpoint when you need to feed web page content to an LLM but want to minimize token consumption and cost. It is ideal when you have a strict context window budget, want BM25-focused relevance filtering on a specific topic, or need structured/skeleton extraction rather than raw HTML. Prefer over raw scraping when ROI tracking and compression metrics matter, or when you need a builtin://stripe-docs shortcut. Not suitable for full-site crawling, real-time monitoring, or when you need the complete unfiltered HTML.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:08.526Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-web-url-context-distiller-bm25-budget-mode-d3c344c1"}