Cloudflare today opened a public beta of spending controls inside its AI Gateway, handing companies a way to cap the dollars their staff and software pour into artificial intelligence models. The release answers a question now circulating through finance departments across the technology sector: where, exactly, did the AI budget go?

The company paired the launch with a second, narrower program. Alongside the open beta of spend limits, Cloudflare announced a closed beta of identity-driven budgets and routing, built on its Cloudflare Access product and an organization's existing identity provider. According to Cloudflare, both features address the same gap. Teams can already see how much an account spends on AI in total. What they often cannot see is which person, team or automated process generated the charge.

A bill nobody can read

The pattern Cloudflare describes is familiar to anyone who has watched corporate AI adoption accelerate. A company hands every engineer access to frontier models through a single shared API key. Usage climbs. At the end of the month, finance pulls the invoice, and the line item resists explanation. Was the spend driven by a machine learning team training a new pipeline? An intern running a premium model on routine email triage? Or, in the example Cloudflare offers, a runaway continuous integration job that consumed 50 million tokens over a single weekend?

A shared key cannot answer that question. It records account-level totals, not the identity of the person or service behind each request. The result, according to Cloudflare, is a spending category with none of the controls applied to every other budget line in a business.

The company traces the problem to a directive many firms issued in the rush to adopt AI. According to Cloudflare, the message to employees was blunt: "Move fast, we'll figure out the bill later." That instruction worked, the company concedes, and AI proved genuinely useful for teams that committed to it. The cost discipline simply never arrived. Without budgets, visibility or routing rules, Cloudflare argues, the rational choice for any employee is to reach for the largest model available for every task - even when a smaller, cheaper model would do the same job. A code review summary does not demand the same engine as a complex architecture refactor. A log parser does not need the model a company points at customer-facing content.

Cloudflare frames the consequence in terms of return on investment rather than cost alone. Without visibility into spend, it argues, no organization can calculate the return on its AI investment, and without controls it cannot protect that return once it is established.

What AI Gateway does

The new controls sit inside a product Cloudflare has built out over the past year. AI Gateway is a layer that sits between an organization's applications and the AI providers it relies on. Rather than calling OpenAI, Anthropic, Google or another provider directly, applications route their requests through AI Gateway first.

That position in the request path gives the gateway a set of management functions. According to Cloudflare, it provides unified billing that lets teams switch between providers and models, logging that captures every request, token count and cost in one place, response caching, rate limiting, and content guardrails capable of blocking personally identifiable information and secrets before they reach a model.

What the product lacked, by Cloudflare's own account, was a straightforward way to answer who was spending what, or to set a ceiling on that spend. An administrator could see aggregate usage across an account. The granular view - that one engineer burned through two thousand dollars on a single model in a month while an entire data science team used four hundred - was missing. So was the ability to declare that one group gets a generous monthly allowance on frontier models while interns are confined to a far smaller budget on cheaper systems. That, the company says, changes today.

Spend limits measured in dollars

The headline feature is deliberately denominated in money rather than tokens. Spend limits are budgets set in dollars that track cumulative spend across every request, and they operate independently of the traditional rate limiting AI Gateway already offered. Where rate limits throttle the frequency of requests, spend limits track accumulated cost against a defined ceiling.

The controls can be scoped along several dimensions. An administrator can apply a limit to a specific model, a specific provider, or to custom attributes defined by the organization itself, such as a user, a team or an application. Time windows are flexible. They can be fixed, resetting on the first of the month, on a Monday or at midnight, or they can roll continuously, and they can be set to daily, weekly or monthly cycles.

Underneath, AI Gateway calculates the cost of each request from the relevant model's pricing and tracks cumulative spend against the limit in real time. Usage surfaces on an analytics dashboard, where it can be filtered by model, by provider or by any custom attribute an organization has defined. According to Cloudflare, spend limits are available in open beta today for all AI Gateway users across every plan, and they can be configured either through the dashboard or through the API.

When the budget runs dry

What happens at the ceiling is configurable. By default, AI Gateway blocks further requests once a limit is reached. Administrators who do not want a hard cap to halt active work can instead write rules through a feature Cloudflare calls Dynamic Routes, which redirect requests to a fallback model after the spend threshold is crossed. The intent, according to the company, is that a budget ceiling need not kill an engineer's workflow outright. Cloudflare added that it is working to introduce alerts that fire when a limit is reached, a capability not yet available in the beta.

The company illustrates the appeal with a concrete configuration. An administrator might decide, in Cloudflare's words, that "engineering gets $5,000/month on frontier models, interns get $200/month on Kimi K2.6." Different work, different models, different ceilings - all enforced at the gateway rather than left to individual discretion.

Identity-driven budgets enter closed beta

Spend limits answer the question of how much, but they rest on an assumption. The budgets work by reading metadata that an organization's own application passes to the gateway, and AI Gateway trusts whatever metadata it receives. For attribution that is verified and automatic rather than self-reported, Cloudflare argues, a system needs to know the identity behind each request. That is the purpose of the second announcement.

When combined with Cloudflare Access, AI Gateway can determine who is making each request - not merely which account, but which employee, which identity provider group and which service. The mechanism relies on standard authentication plumbing. When an employee authenticates through Cloudflare Access, the gateway extracts their identity from the JSON Web Token issued during that process and attaches it as metadata on the request.

Per-user and per-team policies

The practical applications follow from that identity layer. An organization can set per-user budgets, the example Cloudflare gives being five hundred dollars a month for individual contributors and two thousand for senior engineers. When a user reaches the ceiling, requests can be downgraded to a cheaper model or blocked outright.

Per-team policies work the same way and map directly onto the identity provider groups a company already manages. In Cloudflare's illustration, a machine learning team is granted access to premium models such as Claude Opus and GPT-4o, a brand design team can reach generative image and video models, and interns are confined to open-source models running on Workers AI. Because the policies attach to existing groups, administrators do not rebuild their access structure to use them.

Naming the bots

The same approach extends to software that runs without a human in the loop. For continuous integration and deployment pipelines and for autonomous agents, Cloudflare Access service tokens assign each agent a named identity. An administrator can then see, in the company's example, that a code review bot consumed five million tokens in a week while a documentation generator used five hundred thousand. If a single agent runs out of control, a budget policy can be applied to it alone, without disturbing the others. Every log entry carries the authenticated identity - an email address, an identity provider group or a service token name - which can be exported to an analytics platform to produce a cost breakdown by user and by team without custom engineering.

The setup, according to Cloudflare, avoids the work organizations would otherwise face. An administrator creates a Cloudflare Access application for the AI Gateway endpoint and configures policies against identity provider groups. When a developer or an agent makes a request, authentication happens over OAuth using the device-code flow common to command-line tools. The gateway validates the token and extracts the identity. There is no need to write a custom Worker, parse tokens by hand, or fall back on honor-system metadata headers. Identity-driven budgets and policies are available as a closed beta, with sign-up handled through a dedicated form.

Built on Cloudflare's own usage

Cloudflare presents the features as tools it built for itself before offering them to customers. The company says every one of its employees uses AI tools daily, routing millions of requests and billions of tokens each month through AI Gateway, and that it faced the same attribution problem at that scale. Its internal solution was to attach identity to every request through Cloudflare Access, which made per-user consumption, team-level breakdowns and organization-wide cost attribution visible in a single place. According to Cloudflare, the closed beta makes that internal system available externally so that other companies need not build it themselves.

From cost control to cost optimization

Setting a budget is one step. Spending it well is another, and Cloudflare signals that the next phase of the work targets the second problem. The company says it is building intelligent, task-based routing inside AI Gateway. The system would analyze each request and automatically route it to the model expected to deliver the best result at the lowest cost - a summarization task to a smaller, cheaper engine, a large-scale refactor to a more capable one. According to Cloudflare, task-based routing is in active development, with progress to be tracked through its developer documentation and changelog. The aim, in the company's framing, is to move from cost control toward cost optimization, so that the default reach for the most powerful model is replaced by a match between the task and the tool.

Why it matters for marketing and ad tech

The announcement reads as infrastructure news, but the cost pressure behind it has already reached the marketing and advertising technology community. The reason is the speed at which the industry has wired large language models into its core systems.

Over the past eighteen months, the advertising sector has moved agentic AI from experiment to production, with demand-side platforms, supply-side platforms and standards bodies embedding autonomous agents that monitor, diagnose and execute campaign decisions on their own. Those agents run on the same metered models AI Gateway sits in front of, and they generate exactly the kind of opaque, machine-driven consumption Cloudflare's service tokens are designed to attribute. A campaign agent left unattended over a weekend is the marketing analogue of the runaway integration job in Cloudflare's own example.

The economics have not gone unnoticed elsewhere on the platform. A Google engineer warned marketing leaders that token consumption behaves like a textbook case of Jevons paradox, the nineteenth-century observation that greater efficiency in using a resource tends to raise total consumption rather than lower it; his pointed question to the audience - whether they knew where their tokens were going - is the same question Cloudflare now puts to finance teams. The concern is not theoretical. Gartner has forecast that more than 40 percent of agentic AI projects could be scrapped by 2027, with escalating costs among the cited reasons.

Cost discipline is also where Cloudflare has been concentrating. The company cut the token cost of serving web content to AI agents by roughly 80 percent earlier this year through automatic conversion of HTML to a leaner format, and it has since let autonomous agents open accounts, buy domains and push code to production with no human in the loop. Spend controls extend that trajectory from making each request cheaper to capping how many requests a budget will tolerate.

The return on that spend is meaningful for the sector, which sharpens the case for measuring it. Research has found that advertising and media firms reported the highest generative AI returns of any industry surveyed, at 69 percent - a figure that, by Cloudflare's logic, is impossible to verify without knowing what the AI cost in the first place. The macro picture reinforces the point: Alphabet recently priced an equity raise of about 85 billion dollars to fund AI infrastructure it describes as supply-constrained, a scale of investment that has put the physical and financial cost behind every AI answer under fresh scrutiny. For marketing organizations buying AI-powered tools rather than building them, the spending controls land as a sign that the providers and infrastructure layers beneath those tools are now treating model consumption as a line item to be governed, not an experiment to be indulged.

Timeline

  • April 2025 - Cloudflare introduces a suite of AI agent development tools at Developer Week 2025, including managed retrieval pipelines and expanded Model Context Protocol support (PPC Land)
  • July 1, 2025 - Cloudflare launches pay per crawl in private beta, letting publishers charge AI crawlers for content access (PPC Land)
  • October 24, 2025 - Cloudflare partners with Visa and Mastercard on cryptographic authentication for AI shopping agents (PPC Land)
  • November 16, 2025 - Advertising platforms converge behind AI agents; coverage notes Gartner's forecast that more than 40 percent of agentic AI projects could be cancelled by 2027 over escalating costs (PPC Land)
  • February 12, 2026 - Cloudflare introduces Markdown for Agents, cutting the token cost of serving content to AI systems by about 80 percent (PPC Land)
  • March 10, 2026 - A Snowflake study finds advertising and media firms lead all industries on generative AI return on investment at 69 percent (PPC Land)
  • April 5, 2026 - PPC Land documents the physical and financial infrastructure cost behind every AI answer (PPC Land)
  • April 30, 2026 - Cloudflare lets AI agents open accounts, buy domains and ship code to production with no human required (PPC Land)
  • May 2026 - A Google engineer warns marketing leaders that rising token consumption mirrors Jevons paradox and asks whether teams know where their tokens are going (PPC Land)
  • June 3, 2026 - Alphabet prices an equity raise of roughly 85 billion dollars to fund supply-constrained AI infrastructure, reporting that Gemini serving costs fell 78 percent during 2025 (PPC Land)
  • June 5, 2026 - Cloudflare opens a public beta of dollar-denominated spend limits in AI Gateway and announces a closed beta of identity-driven budgets and routing

Summary

Who: Cloudflare, the internet infrastructure company, with features authored by Ming Lu and Kenny Johnson and described on the company blog.

What: A public beta of spend limits in AI Gateway, which cap artificial intelligence model usage in dollars rather than tokens and can be scoped by model, provider or custom attributes such as user, team or application, plus a closed beta of identity-driven budgets and routing built on Cloudflare Access. When a budget is reached, requests are blocked by default or routed to a cheaper fallback model through Dynamic Routes.

When: Announced today, with spend limits available in open beta immediately for all users across all plans and identity-driven budgets offered as a closed beta requiring sign-up.

Where: Inside Cloudflare AI Gateway, the layer that sits between an organization's applications and AI providers including OpenAI, Anthropic and Google, configurable through the Cloudflare dashboard or the API and integrated with an organization's existing identity provider groups.

Why: Shared API keys reveal account-level AI spend but not the person or process behind each charge, leaving companies unable to attribute costs, enforce budgets or calculate the return on their AI investment. Cloudflare positions spend limits and identity-driven budgets as the controls that bring AI consumption in line with every other governed line item in a business.