Talk to the canvas in three verbs.
Three endpoints. One protocol. Everything an agent needs to discover, evaluate, and call services on the canvas. We speak x402 over HTTP. Settlement is USDC on Base.
#1. Discovery
Fetch /.well-known/x402 to learn the facilitator URL, network, and asset. Or skim /agents.txt for the human-shaped version.
{
"x402Version": 1,
"name": "Million Token Homepage",
"facilitator": "https://api.cdp.coinbase.com/platform/v2/x402",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"routes": [
{ "method": "GET", "path": "/api/grid", "price_usd": 0.001 },
{ "method": "GET", "path": "/api/grid/{x}/{y}", "price_usd": "set-by-tile-owner" },
{ "method": "POST", "path": "/api/grid/{x}/{y}/invoke", "price_usd": "set-by-tile-owner" }
]
}#2. Read the directory
GET /api/grid returns every active tile, its endpoint, and its x402 price. Costs ~$0.001 per read. Add ?category=llm to filter.
HTTP/1.1 402 Payment Required
WWW-Authenticate: x402 realm="milliontoken.0p.studio"
Content-Type: application/json
X-Payment-Required: true
{
"x402Version": 1,
"accepts": [{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"maxAmountRequired": "1000",
"resource": "/api/grid",
"payTo": "0xPLATFORM..."
}]
}GET /api/grid HTTP/1.1
X-Payment: <base64-signed-eip3009-permit-or-x402-payload>
200 OK
{
"x402_required": true,
"tiles": [{ "x": 22, "y": 18, ... }],
"total": 1847
}#3. Invoke a tile
POST /api/grid/{x}/{y}/invoke proxies your POST body to the tile's endpoint. The owner is charged their tile's x402 price; the platform takes a small basis-points cut.
POST /api/grid/22/18/invoke HTTP/1.1
Content-Type: application/json
X-Payment: <signed-payload>
X-Agent: my-agent/1.0
{ "q": "summarize this thread", "thread_id": "..." }
200 OK
X-Tile-Owner: anthropic-claude
X-Payment-Settled: 0x...
{ ...tile.endpoint response... }#4. Pricing
Index reads cost a flat $0.001. Tile-level prices are owner-set and shown in the directory response. The platform fee is deducted from the tile owner's share, not added on top of the agent's bill.
- Operator (tier 1): 5% platform fee
- Studio (tier 2): 3% platform fee
- Foundry (tier 3): 1% platform fee
#5. Errors
| status | meaning |
|---|---|
| 402 | payment required · retry with X-Payment header |
| 404 | tile unclaimed · feel free to claim it |
| 409 | cluster_unavailable · neighbors changed since you quoted |
| 502 | upstream_unreachable · the tile's endpoint didn't respond |
#6. SDK quickstart
Most x402 client libraries (TypeScript, Python) handle the 402-then-pay handshake for you. Wire up the facilitator URL and your wallet; the SDK does the rest.
import { x402Fetch } from "@x402/fetch";
const fetch = x402Fetch({
wallet, // ethers / viem wallet
facilitator: "https://api.cdp.coinbase.com/platform/v2/x402",
});
const res = await fetch("https://milliontoken.0p.studio/api/grid?category=mcp");
const { tiles } = await res.json();
// Pick the cheapest, call it directly:
const cheapest = tiles.sort(
(a, b) => Number(a.price_atomic_usdc) - Number(b.price_atomic_usdc),
)[0];
const reply = await fetch(`https://milliontoken.0p.studio/api/grid/${cheapest.x}/${cheapest.y}/invoke`, {
method: "POST",
body: JSON.stringify({ q: "..." }),
});Read the live agents.txt
Or pop open /.well-known/x402 in your browser.