# Context Relay – Web Page to LLM-Ready Markdown

> Context Relay – Web Page to LLM-Ready Markdown is a paid API for AI agents from context-relay.contextrelay.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Converts a public web page URL into compact, LLM-ready Markdown with relevant passages, source excerpts, provenance hashes, and token-savings estimates.

## Facts

- Endpoint: POST https://context-relay.contextrelay.workers.dev/api/v1/context
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/context-relay-web-page-to-llm-ready-markdown-826f38db
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O-vGYO77-RWLXQm2w8iVj

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 context-relay-web-page-to-llm-ready-markdown-826f38db -d '<json body>'
```

Example prompt: Grab the content from https://en.wikipedia.org/wiki/Large_language_model and convert it into compact LLM-ready markdown, pulling out only the passages most relevant to how transformers work — I want to minimize tokens and get provenance info.

## When to prefer this

Choose this endpoint when you need to ingest a public web page into an LLM context efficiently and want to avoid wasting tokens on raw HTML boilerplate, navigation chrome, and ads. It is ideal for RAG pipelines, citation tasks, and summarization workflows where provenance and reproducibility matter. Prefer it over raw HTTP fetches when the page is long or noisy. Not suitable for PDFs, login-gated pages, or JavaScript-only single-page apps.

## Known failure modes

- URL points to a login-gated or paywalled page — returns error or empty content
- URL serves a JavaScript-rendered SPA with no static HTML — not supported
- URL points to a PDF or non-HTML document — not supported
- URL is unreachable or returns a non-200 status — returns fetch error
- Malformed or non-public URL — returns validation error
- Rate limit or payment failure (x402) — returns 402 or 429 status

## How this service works

URL-to-Markdown web extraction and context compression for AI agents. Fetch a public web page and return clean, task-relevant, citation-verifiable LLM context with exact excerpts, locators, hashes, and estimated tokens saved. Use before an agent summarizes, answers questions from, or cites a long or noisy URL. Deterministic and model-free. Public HTML only; no PDFs, logins, or JavaScript-only pages.

## Output

Returns a compact Markdown representation of the target web page, including task-relevant passages, exact source text excerpts with locators (e.g. heading paths or paragraph IDs), a provenance hash for the source document, and an estimated count of tokens saved versus a raw HTML fetch. The output is deterministic and model-free — the same URL produces the same result.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "maxLength": 4096,
   "description": "Public HTTP or HTTPS page to retrieve."
  },
  "question": {
   "type": "string",
   "maxLength": 2000,
   "description": "Optional task or question used to rank relevant passages."
  },
  "max_tokens": {
   "type": "integer",
   "default": 4000,
   "maximum": 12000,
   "minimum": 250
  },
  "max_price_usd": {
   "type": "number",
   "minimum": 0,
   "description": "Abort before retrieval if the fixed service price exceeds this amount."
  },
  "freshness_seconds": {
   "type": "integer",
   "default": 3600,
   "maximum": 86400,
   "minimum": 60
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/context-relay-web-page-to-llm-ready-markdown-826f38db/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from context-relay.contextrelay.workers.dev](https://www.zero.xyz/host/context-relay.contextrelay.workers.dev/llms.txt)
