# Context Condense API

> Context Condense API is a paid API for AI agents from x402-v2-mint-context-condense.vercel.app, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-31).

Condenses long text into a retained-fact list with a dropped-content log and before/after token counts to help AI agents stay within token budgets

## Facts

- Endpoint: POST https://x402-v2-mint-context-condense.vercel.app/v1/context-condense?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/context-condense-api-a6d18e4b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BNDkPWq9d_0CBecVmvVB-

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 context-condense-api-a6d18e4b -d '<json body>'
```

Example prompt: Condense this 3000-word article into at most 15 key facts and keep it under 400 tokens — I need to see a log of what was dropped so I can audit the information loss.

## When to prefer this

Choose this endpoint when an AI agent needs to fit a long document or context into a strict token budget while retaining an auditable list of key facts and a log of what was dropped. It is especially useful for agentic workflows that need transparent information-loss tracking, unlike simple summarization APIs that give no visibility into what was omitted. Best when you need both compression and auditability in a single call.

## Known failure modes

- Text exceeds 20,000 character limit — request rejected with validation error
- target_tokens set below 20 or above 4000 — request rejected
- max_facts outside 1-40 range — request rejected
- OpenRouter upstream failure causing condensation to fail
- Payment not processed (x402 protocol failure) — 402 response returned
- Empty or missing text/content field — no condensation performed

## How this service works

Condense text for token budgets: retained-fact list + dropped-content log + before/after token counts (OpenRouter free-first + approx counter). Audit loss.

## Output

Returns a JSON object with ok status, a list of retained facts extracted from the source text, a log of dropped content for auditability, and before/after token counts showing how much the text was compressed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 20000,
   "description": "Source text to condense"
  },
  "content": {
   "type": "string",
   "maxLength": 20000
  },
  "max_facts": {
   "type": "integer",
   "default": 12,
   "maximum": 40,
   "minimum": 1
  },
  "request_id": {
   "type": "string"
  },
  "target_tokens": {
   "type": "integer",
   "maximum": 4000,
   "minimum": 20
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "context-condense",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/context-condense-api-a6d18e4b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-context-condense.vercel.app](https://www.zero.xyz/host/x402-v2-mint-context-condense.vercel.app/llms.txt)
