# AgentDiet Token Optimizer

> AgentDiet Token Optimizer is a paid API for AI agents from status.agentdiet.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-22).

Compresses and distills AI context windows to reduce token usage by up to 85-91% before passing content to LLMs

## Facts

- Endpoint: GET https://status.agentdiet.dev/v1/token-optimizer?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-token-optimizer-db1410a2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Wk12Nh5dBR4HUk7Fp1UZd

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-token-optimizer-db1410a2
```

Example prompt: Can you run this URL through AgentDiet's token optimizer to compress the content before I send it to the LLM — I want to cut down the token count as much as possible using GET mode?

## When to prefer this

Choose this endpoint when your agent pipeline needs to reduce token consumption before expensive LLM calls, when context windows are near capacity, or when you want to cut inference costs systematically. Particularly suited for A2A and MCP workflows where deterministic token budgeting matters and you want provable compression ratios (roi_proof) rather than heuristic summarization.

## Known failure modes

- Missing required 'input' object returns validation error
- Invalid or unreachable URL in queryParams.url causes fetch failure
- Unsupported HTTP method enum value returns schema rejection
- Content already minimal may yield low compression ratio
- Payment not settled in USDC on Base results in 402 response

## How this service works

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

## Output

A JSON response containing the compressed/distilled data payload, a status field, and an roi_proof object with a compression_ratio_pct indicating how much the input was reduced (e.g. 91.4% compression).

## 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": {
      "url": {
       "type": "string"
      },
      "mode": {
       "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-token-optimizer-db1410a2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from status.agentdiet.dev](https://www.zero.xyz/host/status.agentdiet.dev/llms.txt)
