{"uid":"cap_KukDhnPYQYWPOXUcquSAn","slug":"agentdiet-preflight-certify-context-compression-pre-check-ad7bd2c2","name":"AgentDiet Preflight Certify — Context Compression Pre-Check","description":"Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.","url":"https://rag-diet.agentdiet.dev/v1/preflight/certify?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","POST"],"type":"string"},"queryParams":{"type":"object","properties":{"url":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":{},"status":"ok","roi_proof":{"compression_ratio_pct":91.4}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XST3sTByPHiq7tjuUtfMX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates and certifies whether a given URL's content is eligible for context-window compression/distillation before committing to a full diet run","exampleAgentPrompt":"Before I run the full context compression, do a preflight certification on https://example.com/long-document using a GET request to see if it's eligible and what kind of compression ratio I can expect.","exampleUseCases":[{"title":"Pre-check before expensive compression run","prompt":"Can you do a preflight check on https://docs.mycompany.com/api-reference to certify it's eligible for context distillation and show me the expected ROI before I commit to the full token diet?"},{"title":"Validate RAG source eligibility","prompt":"I want to feed https://arxiv.org/abs/2401.00001 into my RAG pipeline but the paper is huge — can you certify it for compression first and tell me how much I can shrink the context window?"},{"title":"Agent cost optimization pre-check","prompt":"Before my agent processes this lengthy report at https://reports.example.com/q4-analysis, run a preflight to verify it can be de-bloated and what compression ratio to expect so I know if it's worth it."}],"resultDescription":"Returns a JSON object with a status field ('ok'), a data object containing certification details, and an roi_proof object that includes the expected compression_ratio_pct (e.g. 91.4%), indicating how much the content can be compressed before a full diet run is committed.","failureModes":["Missing or invalid URL query parameter returns an error or empty data object","URL is unreachable or returns non-200 status, causing certification failure","Content type not supported for compression (e.g. binary files, paywalled pages) may return failed certification","Payment not settled in USDC on Base may block access with a 402 response","Malformed input object (missing required 'type' or 'method' fields) returns schema validation error"],"whenToPreferThis":"Use this endpoint when you want to assess the viability and expected ROI of context-window compression for a specific URL before committing to a full (potentially more expensive) AgentDiet distillation run. Ideal for cost-conscious agents that want to gate on compression eligibility, or when building pipelines that need a certification step before downstream processing. Prefer this over jumping straight to the full compression endpoint when the document size or compressibility is unknown.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:59.951Z","isFirstParty":false,"canonicalSlug":"agentdiet-preflight-certify-context-compression-pre-check-ad7bd2c2"}