AI Affairs, home

Saturday 3 October 2026

Corporate

Cloudflare opens beta for AI agents to pay per request through HTTP 402

Sellers can set prices for APIs, tools and data, with payments in USDC on Base. Cloudflare AI Gateway, Ceramic.ai and Stocktwits are using the service.

Cloudflare and EY office complex in Lisbon behind parked cars.
Photo: Dale Cruse - 10M views from San Francisco, CA, USA, CC BY 4.0, via Wikimedia Commons (cropped)

Cloudflare opened a closed beta of its Monetization Gateway on 30 September, three months after announcing the plan, allowing website and API owners to charge AI agents per request through the HTTP 402 Payment Required status code. Cloudflare says the service settles payments in USDC on the Base blockchain.

Key points

  • Domain owners can set charges for access to websites, APIs, MCP tools and datasets.
  • Buyers authorise payment within the resource request; Coinbase’s x402 Facilitator handles verification and settlement.
  • Cloudflare AI Gateway, Ceramic.ai and Stocktwits are using the gateway for inference, search and stock signals.

HTTP 402 puts payment in the request

The gateway is designed for resources consumed when they are requested, including APIs, tools and data. Cloudflare distinguishes it from its Pay Per Use product for content that a buyer may obtain once and use repeatedly. Under Pay Per Use, verified buyers report each use and pay for it. Under the Monetization Gateway, the request itself is the chargeable use.

A seller decides which requests carry a charge, sets the price and designates where payment goes. The buyer receives payment instructions, signs an authorisation and receives the resource after settlement, according to Cloudflare. HTTP 402 keeps that exchange within the request for the resource rather than sending the buyer to a checkout page or a separate payment API.

Sellers can write pricing rules against a request’s URL, headers or query parameters and select among several pricing schemes. Cloudflare says it handles payment verification and settlement through Coinbase’s x402 Facilitator, along with failures and retries. Settlement uses USDC, a stablecoin pegged to the US dollar, on Base.

That arrangement gives sellers control over which requests are priced while placing payment processing with Cloudflare and Coinbase’s Facilitator. It also allows a charge to vary with what an agent asks for, rather than requiring every request to carry the same price. Cloudflare presents the product as an alternative to subscriptions and prepaid credits for buyers that consume resources one request at a time.

Cloudflare AI Gateway charges at inference time

Cloudflare is also using the product in AI Gateway, where US-based customers can pay for inference when they make a request to a select set of models. They enable that payment method by adding the header PAYMENT-METHOD: x402. AI Gateway already offers credits that customers can buy for use across the service, Cloudflare says.

Inference pricing presents a different requirement from a fixed charge for an API call: AI Gateway bills for tokens through its existing pricing engine. For this use case, Cloudflare says the Monetization Gateway can obtain a price from AI Gateway itself, allowing the seller’s pricing module to determine the charge without maintaining a separate catalogue of rules in the payment gateway.

Cloudflare describes AI Gateway as a service through which developers can reach hundreds of AI models with one API key. Request-time payment adds another way to buy inference alongside its credit balance. The company says the option applies to a select set of models for US-based Cloudflare customers.

Ceramic.ai and Stocktwits price individual calls

Ceramic.ai is using the gateway’s fixed-pricing scheme for its web search API, allowing an agent to pay for a search without an API key. Cloudflare says Ceramic.ai operates a proprietary index of more than 40 billion pages and can return search results in as little as 50 milliseconds. Each paid search is a separate use of the service.

Stocktwits is using the gateway to charge for individual requests for stock signals, Cloudflare says. The platform has more than 10 million users, according to Cloudflare’s announcement. Its founder and chief executive, Howard Lindzon, said the arrangement lets an agent request a specific piece of data when it needs it instead of first arranging a subscription or an enterprise licence.

The two applications use request-based charging for different products: Ceramic.ai sells a search through a fixed-price scheme, while Stocktwits charges for a stock-signal request. Cloudflare says both are using the Monetization Gateway in production during the closed beta.

Topics: Agents, Enterprise adoption