{"uid":"cap_WEfyB6Lm4LjzYw-eiHu6F","slug":"cve-intel-agentdiet-dev-web-url-context-trimmer-distiller-40ce3ff4","name":"Web URL Context Trimmer & Distiller","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-trimmer)","url":"https://cve-intel.agentdiet.dev/v1/context-trimmer?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_s2v6JgwlqmsFcP6L81qx1","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 a URL or raw HTML and compresses it into compact, agent-ready tokens using BM25 budget control and multiple distillation modes","exampleAgentPrompt":"Distill this URL into clean markdown so I can pass it to my LLM without blowing the context window: https://stripe.com/docs/payments — use budget mode with a max of 500 tokens and focus the BM25 query on 'payment intents'.","exampleUseCases":[{"title":"Compress docs page for LLM context","prompt":"Take this Stripe docs page at https://stripe.com/docs/api and distill it into compact markdown — I need it trimmed to 800 tokens max using budget mode, focused on the query 'authentication API keys'."},{"title":"Extract structured data from news article","prompt":"Fetch the article at https://techcrunch.com/2024/05/01/openai-gpt-5/ and give me a structured JSON summary with tables and metadata — use structured mode so I can parse it easily."},{"title":"Skeleton outline of competitor landing page","prompt":"Pull down https://www.anthropic.com and give me just a skeleton outline of the page structure — I want to see the headings and key sections without any filler content."}],"resultDescription":"Returns a JSON object with distilled content (Markdown, structured tables, skeleton outline, or BM25-focused excerpt), cache hit/miss status, billing details, and an ROI proof block showing raw vs. distilled token counts, tokens saved, compression ratio percentage, and estimated LLM cost savings in USD.","failureModes":["Invalid or unreachable URL returns an error status","max_tokens below minimum of 20 causes validation error","mode=budget without a query may return less focused results","Rate limiting or HTTP 402 payment required if credits exhausted","Paywalled or JavaScript-heavy pages may yield poor distillation quality","Raw HTML input exceeding size limits may be rejected"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to ingest web content within a strict token budget, or when you want to preprocess URLs into clean Markdown/structured data before passing to an LLM to reduce cost. Especially useful for agentic pipelines where context window size is a bottleneck, or when you need BM25-focused excerpts relevant to a specific query rather than the full page.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:17.512Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-web-url-context-trimmer-distiller-40ce3ff4"}