{"uid":"cap_c_YtIEdk2dYpwoDrTHXk6","slug":"agentdiet-prompt-compress-dbaf3d7e","name":"AgentDiet Prompt Compress","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://agentdiet.dev/v1/prompt-compress)","url":"https://agentdiet.dev/v1/prompt-compress?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":["x402"],"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":"unknown","protocol":"x402","network":"base","amountUsd":null,"per":"call","confidence":"unknown"},{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Km3NiBLQXatOLj0Y3MUc-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_zPctedh6yedL-lAhhYoVb","protocol":"mpp","methodType":"crypto","chain":"tempo","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":"Compresses and semantically distills a web page URL into a token-efficient representation by stripping 85-97% of HTML bloat","exampleAgentPrompt":"Can you compress the content at https://example.com/long-article into a token-efficient distilled version so I can fit it into my prompt without all the HTML noise?","exampleUseCases":[{"title":"Fitting news articles into LLM context","prompt":"Strip down this news article at https://techcrunch.com/2024/05/01/latest-ai-news/ so it fits cleanly into my AI prompt — remove all the HTML clutter and just give me the semantic content."},{"title":"Reducing research paper HTML for analysis","prompt":"I need to analyze this research page at https://arxiv.org/abs/2401.00001 but it's way too long — can you distill it down to just the meaningful content by removing all the HTML bloat?"},{"title":"Preprocessing competitor page for agent pipeline","prompt":"Before I pass this competitor's landing page at https://competitor.com/features to my summarization agent, compress it to cut the token count way down — use GET mode and strip out all the junk HTML."}],"resultDescription":"Returns a semantically distilled, token-compressed version of the target web page with 85-97% of HTML token bloat removed, preserving meaningful content while dramatically reducing size for LLM context window consumption.","failureModes":["Invalid or unreachable URL returns an error or empty response","Pages behind authentication or paywalls may not be accessible","Very dynamic JavaScript-rendered pages may not yield complete content","Rate limiting or payment failure if the x402 micropayment is not processed","Malformed query parameters result in schema validation errors"],"whenToPreferThis":"Choose this endpoint when you need to feed web page content into an LLM prompt and need to drastically reduce token count without losing semantic meaning. Ideal for agent pipelines that need to ingest many web pages efficiently, or when context window limits are a bottleneck. Prefer this over raw scraping endpoints when token efficiency is the primary concern.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:40:48.113Z","isFirstParty":false,"canonicalSlug":"agentdiet-prompt-compress-dbaf3d7e"}