On 15 September 2026 the German tech news site heise reported that Google had introduced a spend cap for AI and hosting in Firebase, its app development platform. Firebase had announced the feature on its own blog the day before, describing it as a circuit breaker against a simple coding error or an unexpected traffic spike. That sounds like a footnote for app developers. It does, however, touch on a question every business with an AI feature has. What stops the bill when a bug in a loop fires off thousands of requests, or an API key ends up in the wrong hands?
The answer differs by provider. Some settings called “budget” in the console only send an email. Others reject every further request once a fixed amount is reached. I went through the billing documentation of OpenAI, Anthropic, Google, Mistral and Scaleway, as of 21 September 2026.
Alert or stop is the whole difference
Two very different tools carry similar names across providers. An alert, called a spend alert at OpenAI and simply a budget in Google Cloud, sends a message once an amount is reached. Requests then continue unhindered. A cap rejects every further request with an error once the set amount is reached, until the month is over or someone raises the limit.
Google puts it plainly in its documentation on budgets. An alerts-only budget does not automatically cap usage or spending. If you promise a client that an AI feature will cost at most 100 euros a month, a budget alone does not back that promise. It gives you a notification, not a limit.
There is a third mechanism on top, prepaid credit, meaning balance bought in advance. New accounts at OpenAI and on the Gemini API use it by default, and most organizations at Anthropic also pay upfront. When the balance runs out, requests stop. That looks like a built-in cap, but automatic top-ups spoil the effect. At OpenAI, auto-reload is switched on by default when you set up billing. If you do not turn it off deliberately or give it a monthly ceiling, you do not have a cap, you have a standing order. OpenAI’s own help page on prepaid billing also advises against relying on the balance as an instantaneous spending cutoff. Requests can keep running briefly after the credit is used up, and the balance can go negative.
Photo: Ercan Şenkaya / Pexels
The providers compared
The overview shows what can be configured according to each provider’s documentation, as of 21 September 2026.
| Provider | Hard cap possible? | How | Alert only |
|---|---|---|---|
| OpenAI API | Yes | Hard spend limit per organization or project | Spend alerts; the monthly auto-reload limit only restricts top-ups |
| Anthropic (Claude API) | Yes | Own monthly limit for the organization and per workspace, plus the fixed ceiling of the usage tier | Alert thresholds per workspace |
| Gemini API (AI Studio) | Yes | Monthly project spend cap in AI Studio, prepaid credit, usage tier ceiling | not described in the docs |
| Google Cloud (Agent Platform, formerly Vertex AI) | Yes, in preview | Spend cap budget per project and service | Classic budget |
| Firebase | Yes, in preview | Spend cap per service, including Firebase AI Logic | Emails at 50 and 80 percent |
| Mistral | Yes | Monthly spending limit per workspace and organization | not described in the docs |
| Scaleway Generative APIs | No | no blocking threshold available | Billing alerts by email, SMS or webhook |
OpenAI
At OpenAI the cap lives in the settings under Limits, in the Spend section. A spend alert notifies you and lets traffic continue. A hard spend limit rejects requests once tracked spend reaches the amount. The API then returns a 429 error with the code project_spend_limit_exceeded or organization_spend_limit_exceeded. The limit can be set for the whole organization or for a single project and holds until the next monthly cycle. The spend limits guide points out that enforcement is not instantaneous, so recorded spend can slightly exceed the configured amount.
Anthropic
Anthropic combines several layers. Each usage tier carries a fixed monthly ceiling. As of 21 September 2026 that is 500 US dollars on the Start tier, 1,000 dollars on Build and 200,000 dollars on Scale. Below that, you can set your own limit in the Console under Settings > Billing. Once it is reached, the API returns HTTP 400 with a note on when access resumes. For individual applications, workspaces are the most useful tool. Each workspace can get its own monthly limit with alert thresholds, and API keys can be bound to exactly one workspace. The default workspace cannot be limited, so an application belongs in a dedicated one. The details are in Anthropic’s documentation on limits.
Google with the Gemini API, Cloud and Firebase
At Google the answer depends on the route you use to reach Gemini.
On the Gemini API with a key from AI Studio there is a real project cap. Anyone with the editor, owner or admin role on the project can set it in AI Studio on the Spend page under Monthly spend cap. On top of that, each billing account has a usage tier ceiling, which according to Google’s billing documentation is 250 dollars a month on Tier 1 and 2,000 dollars on Tier 2. New accounts start on prepaid billing. When the balance hits zero, all keys in all linked projects stop working at the same time. Google explicitly mentions a billing delay of around ten minutes, during which costs can exceed the cap. Long-running tasks such as batch jobs and agent sessions can also overshoot the project cap.
In Google Cloud, Gemini runs through the Agent Platform, formerly known as Vertex AI. A classic budget there is still just an alarm. What is new are spend cap budgets, which pause a single service in a single project once the monthly amount is reached. Supported services are the Gemini API, the Agent Platform, Cloud Run and Cloud Run functions. As of 21 September 2026 the feature is a preview with limited support. The older workaround, where a function reacts to the budget notification and disables billing for the whole project, still works. It shuts down every resource, though, and Google warns that resources might be irretrievably deleted.
The new Firebase cap is built on the same principle. It covers Firebase AI Logic, which is Gemini access from web and mobile apps, as well as App Hosting, Cloud Functions and Extensions. You set it up in the Firebase console under Usage and billing or in the Google Cloud console, and it requires the pay-as-you-go Blaze plan. At 50 and 80 percent you get an email. At 100 percent the service pauses and the app receives errors.
For regular Gemini keys, one sentence in the Firebase documentation is decisive. The cap applies at project level and to any way the service is used within the project. A key from the same project therefore runs against the same cap, a key from another project does not. Without intervention the pause ends when the new month starts. If you lift the cap earlier, it can take up to an hour before the service responds normally again. The calculation uses gross costs before credits and free tiers. A project that costs almost nothing thanks to a free allowance will therefore reach the cap sooner than the invoice suggests.
Mistral and Scaleway
Mistral offers a monthly spending limit per workspace, which is not set by default. According to Mistral’s documentation, once a workspace reaches its limit, API access for that workspace is suspended until the next month begins or an admin raises the limit. The other workspaces keep running. You configure it in the Admin Panel under Administration, Workspaces and Settings, and there is an organization-wide limit above it. Whether Mistral warns beforehand and how quickly the block takes effect is not described in the documentation.
At Scaleway the answer is short. The Generative APIs FAQ says you currently cannot configure a threshold after which usage is blocked. There are billing alerts by email, SMS or webhook. Rate limits, meaning the ceiling on how many requests and tokens go through in a given period, cap costs indirectly. For fixed costs, Scaleway points to a dedicated deployment. Which providers run their models in Germany or the EU is covered in a separate comparison.
Why no cap stops to the cent
Every provider that offers a cap qualifies it in its own documentation. The cost of a request is only recorded after the request, then aggregated and compared with the limit. More requests go through in the meantime. Google puts this at around ten minutes for the Gemini API, Firebase speaks of several minutes, and both OpenAI and Firebase state that enforcement is not instantaneous. Whatever accrues in that window is billed as normal.
Photo: Luke Miller / Pexels
For an ordinary application that is not a problem. A cap exists to shrink a runaway that would otherwise go unnoticed for days or weeks down to a few minutes. If many requests run in parallel against a large model with long answers, though, even ten minutes can cost noticeable money. That is why the provider cap is the safety net and not the first line.
One more detail shows up in operation. The error returned when a cap is hit can look like an ordinary rate limit. At Anthropic the tier ceiling arrives as a 429 of type rate_limit_error, but without the retry-after header that a real rate limit carries. OpenAI says explicitly that retrying these errors will not restore access. An application that blindly retries every 429 will keep spinning until the end of the month.
How to protect your own AI feature
If you build an AI feature into a website or an internal tool, the limit belongs in several places. These are the steps I recommend, from setup to error handling.
Every application gets its own key in its own project or workspace. The cap then applies to that one application only. If a key leaks, you revoke exactly that key and all other applications keep running. The key belongs on the server, never in the source code of a website where anyone can read it.
With the provider, set the cap on exactly that project, well above normal usage and below the amount that would really hurt. Switch automatic top-ups off or give them a monthly ceiling.
Every single request gets an output limit, called max_tokens or max_output_tokens depending on the provider. Tokens are the unit text is billed in. For reasoning models, the thinking level belongs in the same setting. Google states in its Gemini documentation that thinking tokens are billed as output and count towards the output limit. What a single task costs with Gemini Flash is covered in a separate article.
The most important limit sits inside your own application, as a counter in front of every AI call. It has no delay, because it counts before the request even goes out. This is enough as a skeleton:
const DAILY_LIMIT = 500; // example value, adjust to your needs
if (await usage.requestsToday() >= DAILY_LIMIT) {
return "The AI assistant is taking a break for today. It will be back tomorrow.";
}
Photo: Kaboompics / Pexels
If the feature is publicly reachable, for example as a chat on your website, add a limit per visitor, such as a fixed number of requests per hour and IP address. That also keeps automated abuse small before it ever reaches the provider cap.
Finally, the application handles cap errors separately. Instead of retrying endlessly, it shows a friendly message and notifies you, so you can decide whether to raise the limit.
For pure testing you can also avoid the cost risk with a free tier. It is worth taking a close look there at what happens to the data you send.
If you are planning an AI feature and want to keep its costs properly capped from day one, get in touch and I will look at your setup and tell you where each limit should sit.
FAQ
Does a Google Cloud budget stop my costs?+
No. A classic Google Cloud budget sends alerts at the thresholds you set, and usage carries on afterwards. Google says so explicitly in its documentation. A real stop is available through spend cap budgets, which apply per project and service and are in preview as of 21 September 2026. They can pause the Gemini API and the Agent Platform, formerly Vertex AI, among others.
How do I set a hard spend limit at OpenAI?+
In the settings under Limits you will find the Spend section. There you set a hard spend limit for the whole organization or for a single project. Once it is reached, the API returns a 429 error until the next monthly cycle starts or someone raises the limit. A spend alert, by contrast, only sends a notification.
Does the new Firebase spend cap also cover a regular Gemini API key?+
Yes, as long as the key belongs to the same project. According to the Firebase documentation, the cap applies at project level and to any way the service is used within that project. A key from a different project is not covered. For the Gemini API without Firebase there is also a separate project spend cap directly in AI Studio.
Why am I billed more than the limit I set?+
Because billing lags behind the requests. Google cites around ten minutes for the Gemini API, Firebase speaks of several minutes, and OpenAI notes that recorded spend can slightly exceed the configured amount. Whatever accrues in that window is billed as normal. If you want to rule that out, you also need a limit inside your own application.
Want to know more?
In a free intro call we discuss how you can use these topics for your company. Not a sales pitch, but an honest assessment.
Book a free intro call



