Cloudflare has opened a closed beta for its Monetization Gateway, a service that lets domain owners charge AI agents for access to websites, APIs, MCP tools, or datasets. The company announced the plan three months ago and has since worked with customers now running the Gateway in production. Access is requested through the Cloudflare Dashboard.

Why subscription billing does not fit agents

Most software businesses sell through subscriptions or prepaid credits, models that demand a meaningful upfront commitment from the buyer and therefore cap how many services any one buyer will adopt. Agents do not behave that way. They pursue outcomes — asking a question, calling an MCP tool, ingesting a data feed — and will visit unfamiliar sites in service of an answer.

Businesses want a place in that critical path: meeting new users where they are, charging for their contribution to an agent's answer, and establishing a position in headless agentic commerce. Capturing that requires billing units that match agent consumption — per request, per search query, per token. Existing payment rails were built for buyers who tolerate latency, transact in large amounts, and are known to the seller. Agents need the inverse: cheap, fast, reliable payments that scale with minimal human involvement.

Cloudflare's position is that sellers and buyers will gravitate to whichever payment network aligns with consumption-based billing. Stablecoin transactions and their blockchain networks currently meet those requirements, though existing networks may add support and new networks may emerge. The Gateway's function is to let sellers concentrate on their product while buyers get a predictable purchasing experience.

HTTP 402 as the payment interface

The Gateway charges per use for any resource behind Cloudflare's network, aimed at resources where each request is the use — APIs, tools, and data. High-value content works differently, since a page might be crawled once and reused many times; for that case Cloudflare offers Pay Per Use, a network of verified buyers who report each use and pay for it.

Payment rides on the HTTP 402 Payment Required status code, so a buyer can offer payment inline with the request for the resource. There is no redirect to a checkout page and no separate payment API. Sellers declare which requests require payment, the price, and where funds should go; buyers receive the instructions, sign an authorization, and get the resource once settlement completes.

Think of it as a paywall for agents: sellers can go live in seconds, choose the audience to charge, and block access until payment lands. Pricing rules can match any part of a request, such as the URL, headers, or query parameters, and several pricing schemes are available. Cloudflare handles payment verification and settlement through Coinbase's x402 Facilitator, along with failures, retries, and analytics, and it absorbs changes to the x402 protocol. Payments settle on the Base blockchain in USDC, a stablecoin pegged to the U.S. dollar. The roadmap includes making seller services discoverable to agents, exposing logs for all transactions, adding payment rails, and incorporating identity primitives.

Cloudflare AI Gateway: inference billed at request time

Cloudflare's AI Gateway is a control plane and model marketplace that gives developers access to hundreds of AI models under a single API key. It currently sells credits that apply toward all AI Gateway consumption, but as more agents carry wallets, a credit balance as the sole usage mechanism introduces friction. Starting today, U.S.-based Cloudflare customers can pay for inference at request time against a select set of models by adding the header PAYMENT-METHOD: x402; instructions live in the AI Gateway developer docs.

AI Gateway runs a pricing engine that determines how each token is billed. The Monetization Gateway was co-designed to support origin-controlled pricing: when enabled, it fetches pricing information directly from the seller. That lets AI Gateway rely on its existing pricing module instead of maintaining a duplicate rules catalog in the Gateway. Sellers who need origin-set prices can email [email protected].

$ curl -iX POST "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run" \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Payment-Method: x402" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "z-ai/glm-4.7-flash",
    "input": {
      "max_tokens": 9001,
      "messages": [
        {
          "role": "user",
          "content": "What is Cloudflare?"
        }
      ]
    }
  }'

Ceramic.ai: search queries

"The web was built for a human buyer, someone who signs up and enters a card. Agents need to act on their own behalf, and payments are how they do it. Search is one of the first things every agent needs, so it should be one of the first things an agent can buy." — Dr. Anna Patterson, Founder, Ceramic.ai

Ceramic.ai offers a web search API built for agents, backed by a proprietary index of more than 40 billion pages and tuned at every layer for machine callers, with results returned in as little as 50 milliseconds — fast enough for an agent to search repeatedly during a task.

Search is among the most elastic purchases an agent makes: a simple question may take one query, while deep research may take hundreds. Paying per query removes the need to ration searches against a preset budget and lets the agent decide how hard to look based on what is at stake. Ceramic.ai uses the Gateway's fixed pricing scheme so agents can pay to run a search without an API key; a demo and the Ceramic.ai docs cover the setup.

Stocktwits: market signals

"Agents change the way data gets consumed. Instead of a customer signing up for a subscription or negotiating an enterprise license, an agent can ask for exactly what it needs, when it needs it. The ability to charge for that individual request opens up a completely new way for Stocktwits to make its data available." — Howard Lindzon, Founder and CEO, Stocktwits

Stocktwits launched in 2008 and pioneered cashtags, such as $NET, to organize conversation around individual tickers. More than 10 million people now use the platform to follow markets and share ideas, giving it a real-time view of retail investor attention. From that activity it derives signals:

  • Sentiment: whether recent posts about a ticker lean bullish or bearish
  • Message volume: how much conversation a ticker generates against its typical activity
  • Followers: how many users follow a ticker, a gauge of sustained retail interest
  • Trending: which tickers are gaining attention fastest

These signals already ship through Stocktwits' data products, and the Gateway adds a distribution channel for a new kind of customer: agents needing market context on demand, for example one monitoring a portfolio or checking whether conversation around $NET is accelerating. Rather than requiring a traditional data license, a developer pays for the requests the agent actually makes.

Stocktwits built a separate agent-facing path with the Gateway in front of it, leaving its existing API and enterprise data products untouched. Each request is priced individually, so the company can reach AI agents without disturbing existing licensing models. Setup is documented in the Stocktwits API docs.

API2PDF: document generation

API2PDF, a REST API for generating PDFs from HTML and Office documents, launched in 2018 and now sees enough AI agents directing developers to the service that it treats them as a first-class customer.

Its consumption-based model charges for the bandwidth and compute each request consumes. Previously, customers had to create an account and obtain an API key, then supply a credit card after the first month — a sequence that produced a conversion drop-off greater than 50%. Now a request without an API key returns an HTTP 402 response. Because cost varies with compute and bandwidth, API2PDF uses variable pricing to tell agents the maximum a single request could cost; once the client pays, the request is fulfilled and only actual consumption is settled.

Agents face the same build-versus-buy question as developers. An agent that needs a PDF can spend tokens producing one itself, or pay a specialized API like API2PDF a fraction of a cent to do it properly.

Availability and orchestration

The Monetization Gateway is in closed beta for eligible U.S.-based sellers and buyers, with additional geographies planned. Onboarding applications are handled through the Cloudflare Dashboard, and the developer docs cover implementation. Cloudflare directs questions, ideas, and interest in scaling agentic payments to [email protected].

$ curl -iX POST https://v2.api2pdf.com/chrome/pdf/html --header "Content-Type: application/json" --data '{"html":"<p>Hello from an AI agent</p>"}'

HTTP/2 402
content-type: application/json
payment-required: eyJ4NDAy...