{"uid":"cap_cnUN35ysobTbXT7q7iYle","slug":"agentdiet-semantic-distillation-api-2c565fd5","name":"AgentDiet Semantic Distillation API","description":"15-App Autonomous Business-to-Agent (B2A) API Hub & MCP Suite. Supports Web Distillation, On-Chain Risk, DEX Token Intelligence, B2B Lead Enrichment, Domain OSINT, Email Verification, SEC Filings, GitHub Audits, Prompt Firewall, and native HTTP 402 (x402 Base USDC).","url":"https://agentdiet-72343955726.us-central1.run.app/v1/distill?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","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","description":"Distillation mode"},"query":{"type":"string","description":"BM25 focus query when mode=budget"},"max_tokens":{"type":"integer","description":"Strict token budget ceiling when mode=budget"}}},"responseSchema":{"type":"json","example":{"data":{"mode":"markdown","title":"Example Documentation","content":"# Example Documentation\nClean agent-ready markdown..."},"status":"ok","roi_proof":{"raw_tokens":14200,"tokens_saved":13520,"roi_multiplier":67.6,"distilled_tokens":680,"compression_ratio_pct":95.2}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_EXKczXU8dtKs-XG50MEXr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches and distills a webpage URL or raw HTML into a compact, token-efficient representation (Markdown, structured JSON, skeleton outline, or BM25-pruned budget excerpt) to minimize LLM token consumption.","exampleAgentPrompt":"Distill the webpage at https://stripe.com/docs/api into compact Markdown and tell me how many tokens you saved compared to the raw page.","exampleUseCases":[{"title":"Token-budget RAG pipeline preprocessing","prompt":"Before you send the content of https://docs.openai.com/api-reference to the LLM, distill it in budget mode focused on the query 'rate limits' with a max of 2000 tokens so I don't blow my context window."},{"title":"Structured data extraction from product page","prompt":"Fetch https://www.bestbuy.com/site/apple-macbook-pro-16/product123.p and distill it in structured mode so I get the specs, price tables, and metadata as clean JSON without all the HTML noise."},{"title":"Skeleton outline of documentation site","prompt":"Give me a skeleton outline of the page at https://docs.stripe.com/payments so I can see the high-level structure and headings without reading the full content."}],"resultDescription":"Returns a 'data' object containing the distilled content in the requested format (Markdown text, structured JSON with tables and metadata, a skeleton outline, or a BM25-pruned excerpt), plus an 'roi_proof' object showing raw token count, distilled token count, tokens saved, compression ratio percentage, and estimated LLM cost saved in USD. Optionally includes cache status (HIT/MISS) and billing details.","failureModes":["URL is unreachable or returns a non-200 HTTP response, causing a fetch failure","HTML is empty or too minimal to distill meaningfully, returning sparse output","mode=budget used without providing a 'query' parameter, resulting in an error or fallback behavior","max_tokens set too low relative to the content, producing a heavily truncated result","Payment not provided or insufficient for L402/x402 micropayment, resulting in HTTP 402 rejection","Rate limiting or timeout on the target URL causing a delayed or failed fetch"],"whenToPreferThis":"Choose this endpoint when you need to feed webpage content into an LLM and want to minimize token usage and cost before doing so. It is especially valuable when processing long documentation pages, product pages, or any HTML-heavy URLs where raw content would exceed context limits or be wasteful. Prefer it over generic scrapers when you need token-budget control (BM25 pruning with max_tokens), structured extraction of tables and metadata, or a skeleton outline of page structure. The built-in ROI proof (tokens saved, cost saved) makes it easy to justify in cost-sensitive agent pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:30:21.540Z","isFirstParty":false,"canonicalSlug":"agentdiet-semantic-distillation-api-2c565fd5"}