# AgentDiet Preprint Digest — Context Window Distiller

> AgentDiet Preprint Digest — Context Window Distiller is a paid API for AI agents from rag-diet.agentdiet.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-22).

Compresses and distills a query's relevant context (e.g. preprint or document content) into a token-reduced digest, returning a high-compression-ratio summary with ROI proof.

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/preprint-digest?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-preprint-digest-context-window-distiller-077d0818
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7Jt5lzwZ4W5rCwkq2Za6V

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 agentdiet-preprint-digest-context-window-distiller-077d0818
```

Example prompt: Can you use AgentDiet to compress this preprint query into a token-efficient digest — I want to reduce my context window bloat before passing it to my LLM?

## When to prefer this

Choose this endpoint when an AI agent needs to reduce the token footprint of preprint or document content before passing it to an LLM, especially when operating under tight context window constraints or cost budgets. It is well-suited for agentic pipelines that need deterministic, verifiable compression with an ROI proof. Prefer it over generic summarization APIs when you need a quantified compression ratio and x402/USDC micropayment-compatible access.

## Known failure modes

- Missing or malformed 'input' object returns a validation error
- Invalid 'type' value (must be 'http') causes request rejection
- Payment not settled in USDC on Base results in 402 Payment Required
- Empty or missing 'query' param may return an empty or low-quality digest
- Service unavailable if the agentdiet.dev node is offline

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.

## Output

A JSON object containing a compressed data digest ('data'), a success status ('status': 'ok'), and an ROI proof object showing the achieved compression ratio percentage (e.g. 'compression_ratio_pct': 91.4), confirming how much token reduction was achieved.

## Request schema (JSON Schema)

```json
{
 "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": {
      "query": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-preprint-digest-context-window-distiller-077d0818/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rag-diet.agentdiet.dev](https://www.zero.xyz/host/rag-diet.agentdiet.dev/llms.txt)
