# Anicca Context Compressor

> Anicca Context Compressor is a paid API for AI agents from x402-agents-production.up.railway.app, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-13).

Compresses long text into a token-limited summary, fact list, or episode sequence, returning key entities and compression stats, settled in USDC via x402.

## Facts

- Endpoint: POST https://x402-agents-production.up.railway.app/context-compressor
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/anicca-context-compressor-a92ef173
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cot-CgwPNlieveC2CBk0F

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 anicca-context-compressor-a92ef173 -d '<json body>'
```

Example prompt: Compress the following meeting transcript into a facts-mode bullet list with a target of 300 tokens in English — I need the key entities and a compression ratio too: [paste transcript here].

## When to prefer this

Choose this endpoint when an AI agent needs to reduce a large text blob to fit within a prompt budget or downstream token limit, especially when structured output modes (summary, facts, or episodes) and entity extraction are needed simultaneously. Prefer it over generic summarization when you need deterministic token targeting, compression ratio telemetry, and micropayment-based per-call billing via x402/USDC with no subscription overhead.

## Known failure modes

- text field empty or missing — validation error returned
- text exceeds 50,000 character limit — request rejected
- target_tokens outside 100–2000 range — validation error
- unsupported language code — enum validation failure
- payment not settled via x402 — 402 Payment Required response
- service unavailable on Railway — 5xx error

## How this service works

Context compressor for AI agents

## Output

Returns a JSON object with the compressed text string (in the chosen mode: summary, facts, or episodes), a list of key entities found in the original, original and compressed character counts, compression ratio, a safe_t_flag boolean, and a unique compressor_id for traceability.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "summary",
    "facts",
    "episodes"
   ],
   "type": "string",
   "default": "summary"
  },
  "text": {
   "type": "string",
   "maxLength": 50000,
   "minLength": 1,
   "description": "Context to compress."
  },
  "language": {
   "enum": [
    "en",
    "ja"
   ],
   "type": "string",
   "default": "en",
   "description": "Output language."
  },
  "target_tokens": {
   "type": "integer",
   "default": 500,
   "maximum": 2000,
   "minimum": 100
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "facts",
  "compressed": "- Launch moved to Friday.\n- Alice owns the final checklist.",
  "safe_t_flag": false,
  "key_entities": [
   "Alice",
   "Friday"
  ],
  "compressor_id": "cmp_a1b2c3d4",
  "original_chars": 84,
  "compressed_chars": 66,
  "compression_ratio": 1.27
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/anicca-context-compressor-a92ef173/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agents-production.up.railway.app](https://www.zero.xyz/host/x402-agents-production.up.railway.app/llms.txt)
