Agents can't hold a card
A non-human economic actor has a wallet, not a Visa. The fiat world won't onboard it, so it can't reach the services it needs.
Autonomous agents hold crypto, but the world's APIs run on cards. Open a Tab, fund it once, and your agent pays per request from an on-chain balance — with a hard spending cap it physically cannot exceed.
# agent points at the rail, not the provider POST /v1/speak 402 Payment Required price 0.10 X402 net casper:casper-test # agent signs x402 authorization, replays settle ok tx a7f3…b1 left 0.25 X402 speak 200 audio 22.1kB → out/line-01.mp3 # budget runs dry settle insufficient_balance agent goes silent
The gap
Pay-per-call settles the crypto-native services. It does nothing for the APIs that only take a card — and nothing to stop an agent from draining your account overnight.
A non-human economic actor has a wallet, not a Visa. The fiat world won't onboard it, so it can't reach the services it needs.
Hand an agent an API key and it can burn thousands while you sleep. Nobody ships that to production without a hard cap.
You trust the provider's invoice. There is no on-chain proof you were charged for exactly the work you consumed.
Subscriptions and cards assume a human in the loop. Agents need to pay a fraction of a cent, per request, with no approval step.
How it works
The agent never leaves its budget. Every fulfilled request is a real settlement on Casper — and Zug's instant finality is what makes per-call settlement viable.
It points at our endpoint instead of the provider, holding a Casper key and a token budget.
The rail answers 402 with a per-call price in our CEP-18 token.
The agent signs an x402 authorization; the facilitator settles it on Casper in seconds.
The rail forwards to the real API and returns the result — with an on-chain receipt.
Live demo
Claude writes a script. The agent pays per line and goes silent the instant its balance runs out. Overspend isn't discouraged — it's impossible. Pick a budget and run it yourself.
Interactive: set the starting balance, run the agent, and see it stop dead at zero.
Open the live demoWhy Casper
Per-call on-chain settlement is only viable with deterministic finality. On a probabilistic chain you'd wait blocks per request — here the agent acts and knows it settled. Every API call becomes one real, final transaction.
The agent's token balance is its cap. Mint it, meter it, settle it via transfer_with_authorization.
x402 prices each request in tokens. No accounts, no subscriptions, no human approval.
Integrate
Point your agent's HTTP client at the rail and fund a Casper key. The x402 client signs payments automatically — your code just calls the endpoint and gets the result back, bounded by a balance it can't exceed.
// the agent pays per call, automatically const pay = wrapFetchWithPayment(fetch, client); const res = await pay("https://rail/v1/speak", { method: "POST", body: JSON.stringify({ text: line }), }); // 402 → sign → settle on Casper → audio writeFileSync("line.mp3", await res.arrayBuffer());