compress
Compress Text
Compress prose before it enters an LLM context window. Returns the compressed text plus a signed receipt (ratios, refusals, coverage) so the caller can verify what was dropped. Use this instead of truncating or slicing text to fit a budget: truncation drops the tail silently, compression keeps a sentence skeleton and reports what went. Do not use it for source code, config, JSON, diffs or tables - send those verbatim. Very short input (under roughly 2,000 chars) gains little, and verified mode is slower there. To compress a web page, fetch it with the read tool first and compress the markdown it returns, never raw HTML. Prefer deterministic for bulk low-stakes text (free), extractive for ordinary prose, verified when a silently dropped fact would be expensive. Flat per-call price by mode: deterministic free, extractive $0.0008, verified $0.0015 (USDC on Base L2); insufficient credit returns HTTP 402.
text必填squeeze_modetarget_ratio_idempotency_key