# AgentDiet Semantic Distillation

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

Fetches a URL and strips 85-97% of HTML token bloat, returning semantically distilled content for AI agents

## Facts

- Endpoint: GET https://mcp-gateway.agentdiet.dev/v1/distill?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-semantic-distillation-5d87f219
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C5UEZAGOoTMlnDX1iFWzf

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-semantic-distillation-5d87f219
```

Example prompt: Fetch https://en.wikipedia.org/wiki/Artificial_intelligence and strip out all the HTML bloat so I get back just the meaningful text content — I want the distilled version to minimize tokens.

## When to prefer this

Choose this endpoint when an AI agent needs to fetch and process web content but wants to minimize LLM token consumption — ideal for research pipelines, agentic browsing, or any workflow where raw HTML would overwhelm a context window. Particularly useful when cost-efficiency matters and the agent needs clean, readable text rather than structured data extraction.

## Known failure modes

- Invalid or unreachable URL returns an error status
- Target URL blocks bots or returns 403/429, resulting in failed fetch
- Malformed input schema (missing required `type` or `method` fields) causes validation error
- Payment failure via x402 protocol prevents execution
- Very dynamic JavaScript-rendered pages may yield incomplete distillation

## How this service works

AgentDiet Semantic Distillation (/v1/distill) — Strips 85-97% of HTML token bloat (https://mcp-gateway.agentdiet.dev/v1/distill)

## Output

A JSON object with a `data` field containing the distilled semantic content of the fetched URL, a `status` field indicating success, and a `roi_proof` object showing the compression ratio achieved (e.g. 91.4% token reduction).

## 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-semantic-distillation-5d87f219/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp-gateway.agentdiet.dev](https://www.zero.xyz/host/mcp-gateway.agentdiet.dev/llms.txt)
