You shipped an API. An AI agent wants to call it 500 times a day. Here is every way to get paid, and the tradeoff each one hides.
The default. Developer signs up, gets a key, picks a plan, you meter usage.
The hidden cost: agents don't fill out signup forms. An autonomous agent that hits your endpoint and receives a 401 has two options: find your signup page (rare) or leave (common). You lose the call and the agent never comes back. API keys optimize for human developers and quietly exclude the machine economy.
POST /api/parse Authorization: Bearer sk_live_... # 401 if no key → agent must register → most agents won't
Better: sell credit packs. The agent's operator buys $10 of credits, the agent spends them down.
The hidden cost: prepaid credits require a human in the loop for every new agent. You've built a business that scales only as fast as people can click "buy". Fine for $500/mo; a ceiling at $5k/mo.
The HTTP standard just added back status code 402 Payment Required. Your API responds to an unpaid call with a machine-readable invoice. The agent pays — often in USDC, settled in seconds — and retries with proof attached. No account. No key. No human.
# Your server, unpaid request:
HTTP/1.1 402 Payment Required
{"price": "$0.05", "network": "base", "payTo": "0x..."}
# Agent pays, retries with proof:
POST /api/parse
X-PAYMENT: <signed receipt>
# Your server verifies the receipt → 200 + your payload
X-PAYMENT-RESPONSE: <settlement receipt>
The x402 network moved $24.24M across 75.41M transactions in the last 30 days (x402.org, live counter). This is not a whitepaper anymore.
| Model | First dollar | Scales without you? | Fits agents? |
|---|---|---|---|
| API keys + plans | Weeks (signup friction) | No — every agent needs a human | Poorly |
| Prepaid credits | Days | Partly | Okay |
| x402 per-call | Minutes | Yes — fully machine-native | Native |
Use x402 as the front door: any agent can pay per call with zero relationship. Once an agent spends more than ~$50/month, offer them a plan with a discount — now the signup form is a reward, not a wall. Your free tier (5 calls/day, no card) is the lead capture; x402 is the monetization; the plan is the upsell.
The Nano Empire tollbooth is a Python SDK that adds x402 to any endpoint with one decorator — free, MIT, on PyPI. Or use our hosted parser to see the flow from the buyer's side: 5 free calls, no card.
One email a week on charging AI agents: pricing data, protocol changes, working code.