# LLM Token Compression API

> LLM Token Compression API is a paid API for AI agents from agentic-endpoints-testnet.oliver-835.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-16).

Compresses text for LLMs using extractive or truncation strategies to reduce token count to a target

## Facts

- Endpoint: GET https://agentic-endpoints-testnet.oliver-835.workers.dev/compress
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/llm-token-compression-api-21553c4e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EBL9cTIFaDPym0PMgK9VN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability llm-token-compression-api-21553c4e
```

Example prompt: Compress this article text down to around 300 tokens using extractive compression so I can fit it into my LLM prompt: [paste article here].

## When to prefer this

Choose this endpoint when you need deterministic, fast token reduction before calling an LLM and want a choice between extractive summarization (preserves key sentences) and simple truncation. Ideal for RAG pipelines, prompt pre-processing, and cost-control workflows where you must stay within a known context window limit.

## Known failure modes

- Missing required 'text' parameter returns error
- Invalid strategy value (not 'extractive' or 'truncate') causes validation failure
- Target token count larger than input token count may return text unchanged
- Very short input text with a high target token count may not reduce meaningfully
- Payment failure or insufficient USDC balance blocks the call
- Network timeout for very large text inputs

## How this service works

Token compression for LLMs

## Output

Returns compressed text that preserves the most important content from the input, reduced to approximately the specified target token count using either extractive (key sentence selection) or truncation strategy.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Text to compress"
  },
  "strategy": {
   "enum": [
    "extractive",
    "truncate"
   ],
   "type": "string",
   "description": "Compression strategy (default extractive)"
  },
  "target_tokens": {
   "type": "number",
   "description": "Target token count"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llm-token-compression-api-21553c4e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentic-endpoints-testnet.oliver-835.workers.dev](https://www.zero.xyz/host/agentic-endpoints-testnet.oliver-835.workers.dev/llms.txt)
