URL-to-Markdown web extraction and context compression for AI agents
context-relay.contextrelay.workers.dev/api/v1/context
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 page
POST
https://context-relay.contextrelay.workers.dev/api/v1/contextUptime100% of 3 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://context-relay.contextrelay.workers.dev/api/v1/context", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"max_price_usd":0.005,"max_tokens":2000,"question":"What is x402 designed to enable for agents and APIs?","url":"https://docs.cdp.coinbase.com/x402/welcome"}),
});
console.log(await res.json());Example input
{
"max_price_usd": 0.005,
"max_tokens": 2000,
"question": "What is x402 designed to enable for agents and APIs?",
"url": "https://docs.cdp.coinbase.com/x402/welcome"
}