# AgentDiet Web URL Distiller

> AgentDiet Web URL Distiller is a paid API for AI agents from llms-generator.agentdiet.dev, paid per call via MPP, $0.001/call, status unknown (last checked 2026-10-21).

Fetches a web URL and compresses its content into compact, agent-ready tokens using multiple extraction modes (markdown, structured, skeleton, or budget)

## Facts

- Endpoint: GET https://llms-generator.agentdiet.dev/api/diet?utm_source=zero.xyz
- Price: $0.001/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: llms-generator.agentdiet.dev
- Website: https://llms-generator.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/llms-generator-agentdiet-dev-agentdiet-web-url-distiller-e62c2bc9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lpmJI_zAZg99t4YcP_YLU

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 llms-generator-agentdiet-dev-agentdiet-web-url-distiller-e62c2bc9
```

Example prompt: Can you distill https://stripe.com/docs/payments into compact markdown so I can feed it to my LLM without blowing my token budget? Use budget mode with a max of 500 tokens and focus the query on 'payment intents'.

## When to prefer this

Choose this endpoint when an AI agent needs to read a webpage but wants to minimize token consumption before passing content to an LLM. It is especially useful for documentation pages, research tasks, or any workflow where raw HTML or full-page markdown would be too large. The budget mode with BM25 query focusing is ideal when only a specific section of a page is relevant.

## Known failure modes

- Invalid or unreachable URL returns an error status
- Mode enum mismatch causes a 400-level validation error
- max_tokens below minimum of 20 returns a validation error
- query parameter ignored when mode is not 'budget'
- Paywalled or JavaScript-heavy pages may return incomplete or empty distilled content
- Payment failure via x402 may block access and return a 402 response

## How this service works

Distill a web URL into compact agent-ready tokens (Live x402 v2, IETF MPP & MCP endpoint at https://llms-generator.agentdiet.dev/api/diet)

## Output

Returns a 'data' object containing distilled content in the requested format (markdown, structured JSON, skeleton outline, or budget excerpt), plus ROI proof metrics (raw tokens, distilled tokens, tokens saved, compression ratio, estimated LLM cost saved, ROI multiplier), billing details, and cache hit/miss status.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "minLength": 1,
   "description": "Target webpage URL to distill (or builtin://stripe-docs)"
  },
  "mode": {
   "enum": [
    "markdown",
    "structured",
    "skeleton",
    "budget"
   ],
   "type": "string",
   "default": "markdown",
   "description": "Extraction mode: markdown, structured, skeleton, or budget"
  },
  "query": {
   "type": "string",
   "description": "BM25 focus query when mode=budget"
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 20,
   "description": "Strict token ceiling when mode=budget"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "roi_proof",
  "data"
 ],
 "properties": {
  "data": {
   "type": "object",
   "description": "Distilled Markdown, structured JSON tables/metadata, skeleton outline, or BM25 budget excerpt."
  },
  "cache": {
   "type": "object",
   "properties": {
    "status": {
     "enum": [
      "HIT",
      "MISS"
     ],
     "type": "string"
    },
    "cache_key": {
     "type": "string"
    },
    "latency_ms": {
     "type": "number"
    }
   }
  },
  "status": {
   "type": "string",
   "description": "Execution status ('ok')"
  },
  "billing": {
   "type": "object",
   "properties": {
    "agent_id": {
     "type": "string"
    },
    "payment_method": {
     "type": "string"
    },
    "fee_charged_usd": {
     "type": "number"
    }
   }
  },
  "roi_proof": {
   "type": "object",
   "properties": {
    "raw_tokens": {
     "type": "integer"
    },
    "tokens_saved": {
     "type": "integer"
    },
    "roi_multiplier": {
     "type": "number"
    },
    "distilled_tokens": {
     "type": "integer"
    },
    "llm_cost_saved_usd": {
     "type": "number"
    },
    "compression_ratio_pct": {
     "type": "number"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llms-generator-agentdiet-dev-agentdiet-web-url-distiller-e62c2bc9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from llms-generator.agentdiet.dev](https://www.zero.xyz/host/llms-generator.agentdiet.dev/llms.txt)
