A pay-per-call API charges an AI agent a stablecoin micropayment on every request, usually settled over x402 or Stripe Machine Payments. The model replaces the API key plus monthly invoice with an HTTP-native handshake: an agent requests a paid resource, the server returns 402 Payment Required with the price, the agent signs a USDC authorization, and the server returns the data once a facilitator settles the funds onchain. By April 2026, x402 had carried 165 million transactions across 69,000+ agents and ~$50 million cumulative volume, with an average ticket of roughly $0.30. The pattern lets an API charge a billion agents one tenth of a cent each without any of them holding an account.
What Are Pay-per-Call APIs for AI Agents?
A pay-per-call API for AI agents is an endpoint that bills a small stablecoin payment, often $0.001 to $1.00, on each individual request, with no human-mediated signup or recurring invoice. The agent settles inline through the HTTP request itself using a protocol like x402 or Stripe Machine Payments, and the data is returned only after the payment is verified.
The shape is closer to a vending machine than a traditional SaaS contract. There is no API key issued ahead of time, no plan tier the agent has to choose, and no monthly bill at the end. The price is published in the response to a free probe; the agent decides whether the answer is worth the price; and settlement happens during the same TCP connection that returns the data. CoinGecko's x402 endpoint is the canonical example: every request costs $0.01 in USDC, paid on Base or Solana, with no account or prior relationship required between the agent and CoinGecko.
The economic shift this enables is the move from human-shaped to machine-shaped pricing. Human-priced APIs assume a user account, a finite number of plans, a credit card on file, and a long enough usage window for a monthly bill to make sense. Agent-priced APIs assume the opposite: anonymous callers, billions of one-shot interactions, ticket sizes too small to clear a card network. x402's documentation describes this as reviving the dormant HTTP 402 status code that has sat unused since 1996, finally giving it a settlement substrate that makes per-request billing economic.
Three properties distinguish a pay-per-call API from a metered SaaS API. First, settlement is inline rather than after the fact, so a free-tier exhaustion or a churned subscription is impossible. Second, there is no account boundary, so an agent that has never seen the service before pays the same price as one with a long history. Third, the unit of value is the call, not the seat or the month, so pricing maps naturally onto the unit of work the agent actually performs.
How Does Pay-per-Call Billing Work?
The HTTP 402 handshake runs in five steps: an agent requests a resource, the server returns 402 with payment metadata, the agent signs a USDC authorization through EIP-3009 or Permit2, the agent retries the request with the signature attached, and the server returns the resource after a facilitator settles funds onchain. The handshake completes in one round trip plus the chain settlement, with no API key issued at any point.
The protocol-level mechanics map to a specific wire format. The first request is a normal HTTP GET. The server responds with status 402 Payment Required and a PAYMENT-REQUIRED header that lists the chain in CAIP-2 notation (e.g., eip155:8453 for Base), the token contract address, the price, the recipient address, and an optional facilitator URL. The agent reads the payload, decides to pay, and constructs an authorization. For USDC the authorization is an EIP-3009 typed signature over transferWithAuthorization(from, to, value, validAfter, validBefore, nonce); for non-EIP-3009 tokens it is a Permit2 signature. The agent retries the GET with a PAYMENT-SIGNATURE header carrying the signed payload, and the server hands the signature to a facilitator that submits the onchain transaction and returns the resource once finality clears.
The facilitator is what makes this practical. Coinbase's CDP facilitator abstracts the chain submission, gas, retries, and confirmation tracking. Servers can also self-host a facilitator if they prefer to handle their own RPC. The CDP facilitator is free for the first 1,000 transactions per month and charges $0.001 per transaction beyond that, which is the same order of magnitude as the per-call price for many endpoints. Stripe's x402 implementation uses Stripe-side facilitators that route through PaymentIntents and surface the agent payment in the merchant's normal Stripe Dashboard.
Two cryptographic facts are load-bearing. The agent never holds gas on the destination chain because EIP-3009 lets the recipient submit the transaction and pay gas. The server cannot replay the signature because each authorization carries a 32-byte random nonce that the USDC contract burns on first submission. Together they make a one-shot $0.01 ticket viable: an agent with a USDC balance and no native gas token can pay, and the server cannot accidentally double-charge by resubmitting.
For settlement on chains that do not have ERC-20 or EIP-712, the protocol bends. The Solana implementation uses a partial transaction signed by the client, with the facilitator co-signing and submitting; the token is SPL USDC, and the same flat $0.01 ticket model works because Solana's per-transaction cost stays well under a cent.
How do I monetize my API for AI agents?
The shortest path is to add x402 middleware to an existing API: a few dozen lines of code on the server that intercept unauthenticated requests, return 402 with a price, and verify the agent's signed authorization before passing the request through. The middleware speaks to the CDP facilitator or a self-hosted equivalent, and revenue lands in a USDC wallet the API operator controls.
The implementation work depends on the runtime. The Coinbase x402 GitHub repository ships TypeScript, Python, and Go SDKs with adapters for Express, Fastify, Next.js, Hono, and Axios. Cloudflare's Agents SDK bakes x402 into Workers; an MCP server running on Cloudflare can mark individual tools as paid with a few lines of metadata, and Cloudflare handles the 402 response cycle. Stripe Machine Payments wraps the same primitives behind a higher-level surface that connects directly to a Stripe account, with PaymentIntents on the back end.
Pricing the calls is the design decision that follows. Four shapes dominate today.
Flat per-call
One price for every call to the endpoint. CoinGecko's $0.01 USDC per request is the canonical implementation. Flat pricing is the simplest to reason about, the easiest for an agent to budget against, and the right default for endpoints where the cost-to-serve does not vary much. The downside is that it leaves money on the table for high-value queries (deep historical data) and overcharges for cheap ones (a quick price spot check).
Tiered per-call
Different prices per endpoint or per response shape. A search API might charge $0.005 for a top-ten result, $0.02 for a paginated list, and $0.05 for a fully enriched detail record. The 402 response carries the price for the specific endpoint, so the agent sees the menu before committing. Tiering captures the intuition that not all requests are equal without forcing the API to expose a complex usage meter.
Subscription and streaming through MPP
Stripe and Tempo's MPP wraps the per-call handshake in a lifecycle envelope, so an agent can subscribe on a fixed cadence (monthly, weekly, daily) or stream payments per token, per second, or per call in real time. A signature with a 30-day validity window can be charged against multiple times during that window for distinct nonces, which lets a service run a recurring subscription off the same authorization. Streaming MPP, announced at Sessions 2026 on April 29, 2026, settles continuously into a prepaid balance with finality checkpoints — a fit for multi-hour agent tasks that consume API time across dozens of services.
Deferred and metered
Cloudflare's Deferred Payment Scheme is the extension for sub-cent, high-frequency calls. The agent posts a credential up front; the server records consumption against it; settlement happens later on a separate cadence. The wire-level handshake is the same x402 shape, but the ledger of "what is owed" is decoupled from the per-call gas event. For an MCP server billing $0.0001 per tool call, deferred metering is what makes the unit economics positive: settling each call individually would cost more in facilitator fees than the call itself charges.
The pricing-model decision flows from the workload. One-shot data fetches against a stateless endpoint fit flat or tiered per-call. Long-running agent tasks that consume a service over time fit MPP streaming. High-frequency, sub-cent telemetry fits deferred metering. The patterns can also stack: an MPP-billed subscription that grants access to an x402 endpoint, or a deferred-payment MCP server fronted by a tiered access layer.
Pay-per-Call APIs in Production
The first wave of pay-per-call APIs went live between September 2025 and April 2026, anchored by CoinGecko's $0.01-per-request endpoint, Stripe's purl CLI client, Coinbase's Agent.market app store, and Cloudflare's Agents SDK. By April 21, 2026, x402 had moved $50 million across 165 million transactions for 69,000-plus active agents, with an average ticket of roughly $0.30.
CoinGecko's x402 endpoints are the most-watched data point in the corpus. Every API call costs $0.01 USDC, settled on Base or Solana, with no account, no key, and no plan tier. The integration was Coinbase Developer Platform's headline launch case for x402 because CoinGecko is a heavily-used data source for trading agents and the unit price is small enough that an agent making a few hundred queries an hour pays single-digit dollars a day. The CoinGecko endpoint demonstrates that pay-per-call works at the volumes that traditional API key tiers are built for.
Stripe's x402 release on February 10, 2026 added two pieces. First, the protocol-level integration: Stripe accepts USDC on Base, Solana, and Tempo, and routes the agent payment through Stripe PaymentIntents so it shows up in the merchant's existing Dashboard. Second, the purl CLI: a developer-facing tool that performs an x402 request from the command line, much like curl for paid endpoints. The Block reported the launch as US-merchants-only initially, with the 2026-03-04.preview API version required.
Coinbase Agent.market shipped on April 21, 2026 as a discovery surface for agents and the APIs they pay. The marketplace is organized into seven categories — reasoning, data, media, search, social, infrastructure, and trading — and every listing is x402-billed. Agent.market is the closest thing the agent ecosystem has to an app store: an agent operator publishes an endpoint, sets a price, and any x402-aware agent in the wild can find and pay for it without a contract or onboarding step.
Cloudflare's Agents SDK shipped x402 plus MCP integration on September 23, 2025. The SDK lets a developer mark individual tools on an MCP server as paid, with Cloudflare handling the 402 response cycle and settlement at the edge. Cloudflare's Deferred Payment Scheme is bundled in for sub-cent, high-frequency calls. Circle's x402 integration covers the agent side: an agent provisions a Circle MPC wallet, funds it via testnet faucet or a treasury transfer, and signs at the x402 paywall through the Circle Signing API. Together they cover the two halves of the API economy: server-side monetization and agent-side wallet provisioning.
Provider | Mechanism | Price | Chains | Status |
CoinGecko x402 | x402 one-shot | $0.01 USDC / request | Base, Solana | Live |
Stripe purl + x402 | Stripe Machine Payments | Set per merchant | Base, Solana, Tempo | Live (US merchants) |
Coinbase Agent.market | x402 one-shot | Set per listing | Base, Solana | Live (Apr 21, 2026) |
Cloudflare Agents SDK | x402 + Deferred Payment Scheme | Set per Worker | Base, Solana | Live (Sept 23, 2025) |
Circle Wallets x402 | Agent-side wallet → x402 | Per provider | Base, Solana | Live |
Stripe MPP streaming | Per-token / per-second debit | Set per merchant | Tempo (default) | Live (Apr 29, 2026) |
The cumulative numbers carry weight. Cryptonews coverage of the Agent.market launch reported 69,000-plus active agents, 165 million transactions, and roughly $50 million in cumulative settlement volume across x402 by April 21, 2026. Dividing the volume by the transaction count puts the average ticket at about $0.30, which sits between CoinGecko's $0.01 floor and the multi-dollar charges some compute-heavy endpoints set. The distribution skews heavily toward small calls, with a long tail of larger ones — the shape one would expect from a network where agent-driven data lookups dominate the floor and occasional inference or compute calls fatten the tail.
The MCP server angle is worth calling out separately. The Model Context Protocol defines how an LLM-driven agent discovers and calls tools; pairing MCP with x402 lets a tool charge per invocation. A weather tool on a Cloudflare-hosted MCP server can cost $0.0002 per call. A search tool on the same server can cost $0.001. The agent picks tools based on the task; the MCP server returns 402 with the price; the agent's runtime signs the authorization and proceeds. From the developer's perspective, the only meaningful change versus a free MCP tool is adding a price annotation to the tool definition. From the agent's perspective, the only change is having a USDC balance and an x402-aware HTTP client. Cloudflare's Deferred Payment Scheme is what keeps the unit economics positive at the cheap end of this distribution.
What are the tradeoffs of pay-per-call billing?
Pay-per-call APIs gain in onboarding friction (zero), revenue capture (no free tier abuse), and pricing flexibility (sub-cent tickets are economic), but they trade off in revenue collection cost (facilitator fees), custody complexity (a stablecoin wallet replaces a Stripe account), fraud surface (signature replay risk), and support burden (anonymous callers leave fewer breadcrumbs). The honest answer is that x402 is a complement to the API-key model rather than a replacement for it.
Revenue collection cost is the first thing to model. The CDP facilitator charges $0.001 per transaction beyond the free tier of 1,000 calls per month. For a CoinGecko-shaped endpoint at $0.01 per call, that is a 10% take rate at the facilitator layer alone, before chain gas. A self-hosted facilitator removes the per-transaction fee but adds operational cost: an RPC subscription, monitoring, and the engineering time to handle retries and confirmation. Stripe's MPP integration absorbs the facilitator into Stripe's normal merchant economics, but adds Stripe's own fees on the way through. The right answer depends on call volume; high-volume endpoints amortize self-hosting cheaply, low-volume endpoints lean on CDP.
Custody is the second axis. Revenue from x402 lands in a USDC wallet the API operator owns; in the API-key model, revenue lands in a bank account through Stripe. Custody of stablecoin balances is a different operational shape than holding a Stripe balance: keys, hardware-security-module integration, and offramp logistics if the operator wants to convert USDC to fiat. Circle Wallets and Coinbase's Agentic Wallets exist partly to abstract this — operators can use them as managed custody so they never directly hold private keys.
Fraud surface is narrower than the API-key model in some ways and wider in others. There is no API key to leak, so credential theft does not apply. Each x402 signature carries a single-use nonce, so signature replay is contract-enforced. But every paid endpoint is a public surface, and an attacker holding USDC can hammer it for whatever the price says — there is no rate limit until pricing imposes one. Endpoints that serve expensive computations need pricing dynamic enough to make abuse uneconomic, or rate-limiting layered on top of the payment layer.
Support burden is the subtlest difference. With API keys, an unhappy customer has an account with an email; the operator can email them, refund them, or escalate. With x402, the agent that paid is a wallet address, often controlled by an LLM with no human in the loop. Refunds are technically possible (a transfer back to the paying address), but the operator has no canonical channel to reach the agent's owner. For high-stakes endpoints, this argues for hybrid pricing: a free or cheap tier accessible by x402, with a higher tier accessible by Stripe Machine Payments where the merchant relationship and refund machinery exist.
The honest framing is that pay-per-call complements rather than replaces traditional API monetization. A service can run an x402 endpoint for anonymous high-volume agent traffic, an MPP-billed subscription for repeat agent operators, and a Stripe-card tier for human-mediated enterprise customers — three pricing surfaces sharing one underlying API. The infrastructure to do this exists today; the design work is choosing which calls fit which surface.
The comparison to the API-key + monthly-invoice model is instructive on each axis. API keys require signup, plan selection, billing setup, and account onboarding before the first paid call; x402 requires zero. API keys impose monthly cadence on revenue; x402 settles per call, so revenue is realized the moment the call is. API keys assume a finite set of plan tiers; x402 lets every endpoint price independently and dynamically. API keys leak; x402 signatures cannot be replayed. On the other side: API keys give the merchant a relationship with the user; x402 gives them a wallet address. API keys are easy to refund; x402 refunds require the merchant to know the paying address, which the protocol carries but not in a way that maps to a customer record. The right framing is that the two models price different things — a long-term relationship in one case, a single transaction in the other. Agent traffic is heavily weighted toward the latter, which is why x402 exists at all.
Eco's Role in Pay-per-Call API Revenue
Pay-per-call APIs collect revenue in USDC on whichever chain the x402 endpoint settles on, usually Base, Solana, or Tempo. Eco extends that revenue surface to the rest of the chains where API operators actually want to hold balances. An API earning x402 micropayments on Base can route revenue to a treasury on Arbitrum, Polygon, or any of Eco's 15 supported chains through Hyperlane messaging and Circle's CCTP transport, without the operator writing bridging logic.
The cross-chain reality matters because revenue does not always want to live where it lands. An API operator running a CoinGecko-shaped endpoint at $0.01 per call accumulates a stream of small USDC ticks on Base. The operator's treasury or accounting may live on Ethereum mainnet, Arbitrum, or a custodial chain entirely. Stablecoin supply across chains is roughly $318 billion total per DeFiLlama, with USDC at $77.3 billion split across 15+ chains; an x402 operator's revenue and treasury are rarely on the same one. Eco operates as a stablecoin execution network, abstracting routing, solver selection, and finality so the cross-chain leg between settlement and treasury is one call rather than a multi-hop bridge integration. The x402 endpoint stays simple; the treasury logic stays simple; Eco handles the chain reality between them.
Sources and methodology. x402 transaction count, agent count, and cumulative volume verified against Cryptonews coverage of the Coinbase Agent.market launch on April 21, 2026. CoinGecko pricing from the CoinGecko x402 docs. Stripe x402 launch dates from The Block and the Stripe MPP announcement. Stablecoin supplies pulled from DeFiLlama on April 29, 2026. Figures refresh quarterly.
