# AgentDiet Slippage Estimator

> AgentDiet Slippage Estimator 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).

Estimates token slippage/compression ratio for AI context window distillation, returning a compression efficiency proof

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/slippage-estimator?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-slippage-estimator-6acc5509
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3N37l9I2BinsXWXdtAQl0

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-slippage-estimator-6acc5509
```

Example prompt: Before I compress my agent's context, can you run a slippage estimate using a GET request to see what compression ratio I'd get — I want to know the ROI proof before committing to the full token diet?

## When to prefer this

Use this endpoint when you need a lightweight, low-cost ($0.01 USDC) pre-flight check before committing to a full context distillation job. It's ideal for agents that want to estimate ROI and compression efficiency before processing large context windows, without running the full distillation pipeline. Prefer this over the full distillation endpoint when you only need a ratio estimate, not the actual compressed output.

## Known failure modes

- Missing required 'input' object returns validation error
- Invalid method enum value (not GET or POST) causes rejection
- Network or payment failure (x402 USDC payment not settled) returns 402 Payment Required
- Empty or malformed token query parameter may return incomplete estimate
- Service unavailability returns non-200 status with error message

## 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 slippage/compression details, and an roi_proof object that includes a compression_ratio_pct value (e.g. 91.4%) indicating how much the context can be reduced.

## 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-slippage-estimator-6acc5509/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)
