# AgentDiet Token Intel

> AgentDiet Token Intel 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).

Retrieves token intelligence and context compression metadata for a given token, reporting compression ratios and ROI proof for context window optimization.

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/token-intel?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-token-intel-4a57ab66
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fEdC2qa9QDvuB1_8Ov5yc

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-intel-4a57ab66
```

Example prompt: Can you pull token intelligence from AgentDiet for the token 'abc123' and tell me the compression ratio it achieved on my context window?

## When to prefer this

Choose this endpoint when you need to programmatically retrieve compression statistics and ROI proof for a specific token processed through AgentDiet's context distillation pipeline. It is most useful for monitoring, auditing, or validating the efficiency of context compression in A2A or MCP agent workflows. Prefer this over generic analytics endpoints when you specifically need AgentDiet's deterministic compression ratio metrics settled via x402/USDC on Base.

## Known failure modes

- Missing or invalid token query parameter returns error or empty data
- Payment not settled in USDC on Base causes 402 Payment Required response
- Malformed input object (missing required 'type' or 'method' fields) returns schema validation error
- Token not found returns empty data object with ok status
- Network or node unavailability returns 5xx error

## 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

Returns a JSON object with a status field ('ok'), a data object containing token intelligence details, and an roi_proof object that includes compression_ratio_pct — indicating what percentage of context was compressed (e.g. 91.4%).

## 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": {
      "token": {
       "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-intel-4a57ab66/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)
