{"uid":"cap_p7S3cqKUmZupcRxv0Ev5n","slug":"cve-intel-agentdiet-dev-web-content-distiller-with-bm25-budget-control-99c9bc6e","name":"Web Content Distiller with BM25 Budget Control","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://cve-intel.agentdiet.dev/v1/context-bloat-eliminator)","url":"https://cve-intel.agentdiet.dev/v1/context-bloat-eliminator?utm_source=zero.xyz","method":"POST","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_3a2IIGSgRi2uPcEbBzm-L","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"cve-intel.agentdiet.dev","brandSlug":"cve-intel-agentdiet-dev-mpp","brandBaseUrl":"https://cve-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches and distills a URL or raw HTML into compact Markdown, structured JSON, a skeleton outline, or a BM25-ranked token-budget excerpt","exampleAgentPrompt":"Fetch the page at https://stripe.com/docs/api/charges and distill it using budget mode with the query 'charge creation parameters' and a max of 500 tokens, so I can fit the relevant section into my prompt without blowing my context window.","exampleUseCases":[{"title":"Compress documentation before LLM call","prompt":"Pull the page at https://docs.openai.com/api-reference/chat and distill it into Markdown, keeping it under 800 tokens focused on the query 'streaming responses' — I need to pass just the relevant part to my model."},{"title":"Extract structured data from a landing page","prompt":"Take the HTML I'm pasting here and run it through structured mode so I get back tables and metadata — I need clean JSON from this product page, not a wall of raw HTML."},{"title":"Skeleton outline of a long article","prompt":"Distill https://en.wikipedia.org/wiki/Large_language_model into a skeleton outline so I can see the section headings and key points without reading the whole thing."}],"resultDescription":"Returns a 'data' object containing the distilled content in the requested format (Markdown text, structured JSON tables/metadata, skeleton outline, or BM25-ranked 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 optional cache status (HIT/MISS) and billing details.","failureModes":["URL unreachable or returns non-200 status — endpoint may return an error status","HTML payload is empty or malformed — distillation may produce empty or degraded output","mode=budget used without a query field — BM25 ranking cannot proceed without a focus query","max_tokens set below meaningful content threshold (minimum 20) — may produce truncated or empty excerpts","Rate limiting or payment failure (HTTP 402) if USDC balance is insufficient","Idempotency-Key collision if the same key is reused for a different request"],"whenToPreferThis":"Choose this endpoint when you need to reduce token consumption before passing web content to an LLM, especially when the source page is large or noisy. It is ideal when you have a specific focus query (BM25 mode) and a hard token budget ceiling, or when you need structured JSON tables extracted from HTML rather than raw text. Prefer it over generic scrapers when ROI tracking (tokens saved, cost saved) is important, or when you need consistent Markdown output from arbitrary URLs at low cost ($0.001/call).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:32:10.522Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-web-content-distiller-with-bm25-budget-control-176ef31e"}