Access & rails
Three doors into the same API — keyless x402 micropayments, a Mercury API key, or MCP. Same /buy/* services, same prices, same signed provenance receipts whichever door you use.
x402 — keyless, live now
No key, no signup, no account. Hit any /buy/* route; the 402 challenge carries the exact price; your client pays real USDC on Base mainnet (eip155:8453) via the CDP facilitator and retries. 19 live routes from $0.003 per call.
import { wrapFetchWithPayment } from "x402-fetch";
const pay = wrapFetchWithPayment(fetch, account); // any Base wallet holding USDC
const res = await pay("https://network.mercury-hq.com/buy/fetch?url=https://example.com");
const { text, attestation } = await res.json();
// offline check: sha256(text) === attestation.contentHash · EIP-191 signer === pinned keyAPI key — free sandbox, then paid tiers
No wallet. Mint a free mk_test_ key in one call — 100 sandbox calls on the same /buy/* routes with the same signed receipts. Upgrade the key via Stripe to go mk_live_ with metered credits. Keys are shown once and stored hash-only (sha256 + a 4-char tail); issuance is capped at 20 keys per IP per hour.
curl -X POST "https://network.mercury-hq.com/api/dev/keys?live=false"
curl -H "Authorization: Bearer mk_test_YOUR_KEY" \
"https://network.mercury-hq.com/buy/fetch?url=https://example.com"Get a key — the real endpoints
These are the exact live routes this page fronts — nothing here is mocked. Same quota and billing whether you call them by curl or through /developers.
| Endpoint | What it does |
|---|---|
| POST /api/dev/keys?live=false&label=… | Mint a free sandbox key. 201 → { ok, key, keyId, env, tail, usage, save_it }. The raw key is returned ONCE and is unrecoverable — only sha256 + a 4-char tail persist. Cap: 20 keys/IP/hour. |
| POST /api/dev/keys?live=true | Mint an mk_live_ key. It bills prepaid credits — fund it by subscribing the key to a paid tier below. |
| GET /api/dev/balance | Send Authorization: Bearer mk_… → { env, calls, sandbox_remaining + sandbox_cap (test) or credits (live), createdAt, lastUsedAt }. |
| POST /api/dev/subscribe?key=mk_…&tier=pro|business|enterprise | Returns { ok, tier, url } where url is a real Stripe Checkout session. On success Stripe redirects to /developers?upgraded=<tier> and the webhook flips your key to the tier. |
| GET /developers | The live one-click portal page — mint a key and check a balance from the browser. |
| GET /pricing | The tier page with working subscribe buttons (live Stripe Checkout). |
# 1 · mint a free sandbox key — returned ONCE; only its sha256 + a 4-char tail are stored
curl -X POST "https://network.mercury-hq.com/api/dev/keys?live=false&label=my-agent"
# → 201 { ok:true, key:"mk_test_…", keyId, env:"test", tail, usage, save_it }
# 2 · call any /buy/* route with it — same endpoints, same signed receipts as the wallet rail
curl -H "Authorization: Bearer mk_test_YOUR_KEY" \
"https://network.mercury-hq.com/buy/fetch?url=https://example.com"
# 3 · check usage — sandbox keys include 100 free calls
curl -H "Authorization: Bearer mk_test_YOUR_KEY" "https://network.mercury-hq.com/api/dev/balance"
# → { ok:true, env:"test", calls, sandbox_remaining, sandbox_cap, … }
# 4 · upgrade the key to a paid tier — returns a real Stripe Checkout URL
curl -X POST "https://network.mercury-hq.com/api/dev/subscribe?key=mk_test_YOUR_KEY&tier=pro"
# → { ok:true, tier:"pro", url:"https://checkout.stripe.com/…" }MCP — the third door
POST /mcp · remote MCP endpoint
Streamable-HTTP JSON-RPC 2.0 — any remote MCP client (Claude remote MCP, connectors, Smithery-style hosts) connects by URL, no local install. tools/list is free discovery of every paid service as a tool; tools/call authenticates with the same Bearer mk_… key and meters the same way. Every result carries the same signed EIP-191 provenance receipt. GET /mcp returns a plain JSON discovery blob.
# free discovery — no key needed (tools/list)
curl -X POST https://network.mercury-hq.com/mcp -H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# a paid call — same mk_ key, same metered billing, same signed receipt
curl -X POST https://network.mercury-hq.com/mcp -H "content-type: application/json" \
-H "Authorization: Bearer mk_test_YOUR_KEY" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"fetch","arguments":{"url":"https://example.com"}}}'Pricing — the API-key tiers
Prices are read from the same module the live checkout uses, so this strip cannot drift from /pricing.
| Tier | Per month | Included | Rate limit | Key env |
|---|---|---|---|---|
| Sandbox | $0 | 100 calls | 5/min | mk_test_ |
| Pro | $29/mo | 50k calls | 120/min | mk_live_ |
| Business | $199/mo | 1M calls | 600/min | mk_live_ |
| Enterprise | $1500/mo | unmetered calls | — | mk_live_ |
/api/dev/balance, email mercuryuser@proton.me and it will be set right.The quality gate — every rail, every call
Every paid response carries a portable provenance receipt: an EIP-191 signature over sha256(content)‖url‖status‖fetchedAt‖nonce. Recover the signer and compare it to the pinned attestation key 0xACB40253BD71Bb9a5d491b2c6EFF755F2A33Fc75 published at /.well-known/mercury-attestation — or POST the receipt to /x402/verify. The check runs offline, forever, with no Mercury dependency.
# see the live 402 challenge yourself — discovery and checkout are generated
# from the SAME catalog object, so the price you discover is the price you pay
curl -i "https://network.mercury-hq.com/buy/fetch?url=https://example.com"
# → HTTP 402 Payment Required
# → price $0.003 · network eip155:8453 (Base mainnet) · real USDC
# → payTo 0xe10B9d44e72A29B9c19da02981FFCd875308e3C1Payments are per-attempt and non-refundable; the service is best-effort with liability capped at the amount paid — plain-language terms at /terms, entity + verify-yourself claims at /trust.