x402 · Casper testnet · live

Give your agent a budget
it can't blow.

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 · /v1/speak
# 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
Built with Casper 2.0x402CEP-18DeepgramClaudeOdra

The gap

x402 lets agents pay. Nothing lets you trust them with money.

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.

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.

No spend ceiling

Hand an agent an API key and it can burn thousands while you sleep. Nobody ships that to production without a hard cap.

No verifiable metering

You trust the provider's invoice. There is no on-chain proof you were charged for exactly the work you consumed.

No machine-native rail

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

Four steps, one on-chain transaction per call.

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.

01

Agent calls the rail

It points at our endpoint instead of the provider, holding a Casper key and a token budget.

02

402 + price

The rail answers 402 with a per-call price in our CEP-18 token.

03

Sign & settle

The agent signs an x402 authorization; the facilitator settles it on Casper in seconds.

04

Fulfilled

The rail forwards to the real API and returns the result — with an on-chain receipt.

Live demo

Watch an agent hit the wall.

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.

Why Casper

The chain is load-bearing, not incidental.

~2s

Deterministic instant finality (Zug)

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.

CEP-18

Our own credit token

The agent's token balance is its cap. Mint it, meter it, settle it via transfer_with_authorization.

0.10

Sub-cent micropayments

x402 prices each request in tokens. No accounts, no subscriptions, no human approval.

Integrate

A drop-in endpoint for any agent.

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.

agent.ts
// 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());