Cloudflare Monetization Gateway: Letting AI Agents Pay per Request
Cloudflare's Monetization Gateway puts a pay-per-request wall in front of APIs using x402 and HTTP 402. How it works, what setup costs and who can use it.
API2PDF, a service that turns HTML and documents into PDFs, had a familiar problem. New users had to register and add a credit card after the first month, and according to Cloudflare more than half of prospects dropped off at that step. Today a request without an API key gets an HTTP 402 response with a price, the client pays on the spot, and the PDF comes back in the same exchange.
The product behind that change is Monetization Gateway from Cloudflare, first announced in July 2026 and available as a closed beta since September 30. In short, it lets the owner of an API, MCP tool, dataset or website charge for each individual request, with no account or key required from whoever is calling.
Why API keys don’t work for agents
Selling software by the call isn’t new. Cloud services and APIs have been metered for years, but always to a known buyer: someone signs up, gets an API key, adds a card and only then starts using the service. For a person it’s an annoyance. For an AI agent that’s supposed to find a useful tool and call it by itself, it’s a wall.
Card payments also don’t work for tiny amounts, because the transaction fee is higher than the price of a single request. Cloudflare’s answer is stablecoins, which can move fractions of a cent with negligible fees and settle in under a second. Its own examples of where this fits: a few cents per web search, a $0.001 base fee plus $0.01 per MB for an upload endpoint, or $0.99 per resolved support ticket, paid only when the work succeeds.
The launch partners show the same pattern as API2PDF. A search API, Ceramic.ai, sells individual searches over its 40-billion-page index to agents that never registered. Stocktwits sells per-ticker sentiment data. Cloudflare’s own AI Gateway uses it so customers can pay for single inference calls. In every case one request is one unit of value, which is the shape of business the gateway was built for.
The exchange, step by step
The gateway is built on x402, an open payment standard governed by the x402 Foundation, of which Cloudflare is a member. Everything happens inside ordinary HTTP:
GET /premium-data → agent asks
402 Payment Required ← gateway answers
PAYMENT-REQUIRED: price, asset, wallet
GET /premium-data → agent retries
PAYMENT-SIGNATURE: signed authorization
200 OK ← origin responds, payment settles
The useful part for a site owner is where the checking happens. Your server only ever sees requests that already carry a valid payment, because Cloudflare rejects the rest before they leave its network. Each paid request arrives with a signed PAYMENT-CONTEXT token you should verify on your side. The money itself is USDC on the Base blockchain, settled through a facilitator run by Coinbase.
Setting it up as a seller
The configuration answers four questions: which domain, which URLs, how much, and into which wallet. URL rules can be narrowed with the usual Cloudflare request matching, so you can, for example, charge only for one API path, one country or one user agent. Inspecting the request body for pricing is limited to Enterprise customers.
Two settings define the business model:
- Who pays. Everyone hitting the URL, or only verified bots. The second option lets people use a site for free while machines pay.
- How much. A fixed price per request, or variable pricing where the gateway authorizes a maximum and the origin reports the actual usage afterwards.
Prices can go as low as a tenth of a cent and as high as $100 for a single call, according to the developer docs. Cloudflare’s own cut is still unknown.
Can you use it today?
Probably not. Three conditions rule out most readers of this article:
- You have to be in the US. The beta accepts only US-based sellers and buyers, and other regions are promised without a date.
- Your account has to be established. The eligibility page asks for a Cloudflare account at least 60 days old, a credit card on file and a domain that has been proxied through Cloudflare for 30 days or more.
- You have to sell requests, not content. For pages that an AI crawler reads once and uses many times, Cloudflare points to Pay Per Crawl and the newer Pay Per Use program instead. A blog or news site looking for money from AI companies is in the wrong place here.
If you’re outside the US and want to experiment anyway, x402 isn’t tied to Cloudflare. The protocol is open, there’s reference code on GitHub, and the project advertises server middleware that adds a 402 paywall to an endpoint in a few lines. You’d handle verification and settlement yourself instead of at Cloudflare’s edge, and you’d still face the same stablecoin questions.
Open questions
Removing sign-ups for machine clients makes sense to me. If agents are going to discover and call tools by themselves, for example through MCP, they need a way to pay without a human filling in forms, and per-request pricing fits that far better than subscriptions.
The friction moves elsewhere, though. Accepting stablecoins means legal, tax and accounting questions that differ from country to country, and many companies won’t touch them for that reason alone. The setup also depends on Cloudflare and Coinbase, even though x402 is open. Whether HTTP 402 finally becomes a normal part of the web, almost thirty years after it was reserved “for future use”, depends on how many agents end up with wallets.