Kill switch tools

Which tools can actually stop cloud and AI spend?

Three kinds of tool can actually stop cloud and AI spend: caps built into each provider, budgets in an AI gateway your requests pass through, and Costbrake's brakes, which cover 18 of the 35 providers it watches. None of them acts instantly, and most leave something billing.

An OpenAI hard spend limit returns a 429, a Google Cloud spend cap pauses 1 service in 1 project, and a LiteLLM budget blocks the next request through its proxy. Here is what each tool stops, how fast, what keeps charging and what it costs.

What each tool stops, side by side

Every row comes from the vendor's own docs or pricing page. "Built in" means a console setting with no separate price.

ToolWhat it stopsHow fastWhat keeps billingCost
Costbrake brakesThe key, project or workload an admin picks, on 18 providersWhen an admin confirms; checks every 5 minutes on ProProviders without a brake; usage already billedFree $0 (no brakes); Pro $12 a month
AWS Budgets actionsIAM policies or SCPs; chosen EC2 or RDS instancesBudget data refreshes up to 3 times a dayAnything the action doesn't targetFirst 2 action budgets free, then $0.10 a day each
Google Cloud spend capNew usage of 1 service in 1 projectFaster than billing reports, not instantCompute, storage and every other serviceNo additional charge
Google Cloud disable-billing functionEvery resource in the projectPub/Sub budget messages, multiple times a daySpend before the message lands; resources may be deletedNo additional charge, plus Pub/Sub and function usage
Azure spending limitAll deployed services until the billing period endsWhen the credit runs outNot offered on pay-as-you-go or commitment plansCredit subscriptions only
Vercel Spend ManagementProduction deployments of all projectsChecks every few minutesSeats, integrations and add-onsNo additional cost on Pro
Supabase Spend CapOver-quota use of 12 usage itemsAt the quotaCompute and 10 other itemsIncluded on Pro ($25 a month)
GitHub budgetsMetered usage such as Actions, with Stop usage onWhen the budget is exhaustedLicense products like Copilot only alertBuilt in
OpenAI hard spend limitAPI requests in that organization or project (429)Not instantaneousOther projects, when the limit is per projectBuilt in
Anthropic workspace spend limitRequests in that workspace (HTTP 400)When the limit is reachedThe Default Workspace, which can't have oneBuilt in
OpenRouter key credit limitRequests made with that keyWhen the credit limit is used upOther keysBuilt in
LiteLLM budgetsRequests through the proxy for a key, user or teamBefore the request reaches the providerTraffic that skips the proxy; everything if there is no databaseOpen source; Enterprise through sales
Portkey budget limitsThe provider key in Portkey, by expiring itWhen the USD limit is reachedTraffic that skips PortkeyEnterprise and select Pro; Production is $49 a month
Helicone cost rate limitsRequests through the gateway over a cents quotaPer time windowAsync-logged and direct trafficPro $79 a month plus usage

Native caps: the provider stops itself

The strongest stop is one the provider enforces, because it applies to every request, including ones made with a leaked key. The catch is scope: each cap covers one product, project or key, and runs on the provider's own billing clock.

AWS Budgets actions can apply an IAM policy or SCP, or act on specific EC2 and RDS instances, but budget data refreshes only up to three times a day, typically 8 to 12 hours apart. Google Cloud spend caps cover 4 services, one project at a time, and aren't instant. To stop a whole Google Cloud project, Google documents a function that removes billing, which shuts down all resources and might delete them.

Azure's limit exists only on credit subscriptions. Vercel can pause production deployments on Pro, GitHub can block metered usage like Actions, and Supabase's Spend Cap skips compute. On AI APIs, OpenAI's hard spend limit returns a 429, Anthropic workspace limits return HTTP 400, and OpenRouter caps credit per key. Details per provider are in which cloud and AI providers have a hard spending cap.

Gateway budgets: a real block for traffic that goes through

An AI gateway sits between your code and the model provider, so it can refuse a request before it costs anything. That is a true per-request cap, with one condition: the request has to go through the gateway.

  • LiteLLM is an open-source, self-hosted proxy. It sets max_budget on keys, users and teams and rejects requests once spend crosses it. Budgets need a database: without one, the global budget fails open and key, team and user budgets don't work. Per-model budgets need an Enterprise license.
  • Portkey budget limits expire a provider key once it reaches a USD limit, minimum $1, and can't be edited after they are set. Its docs say they are for Enterprise and select Pro customers, and another line on the same page says Enterprise only. Production costs $49 a month.
  • Helicone can rate-limit by cost with a u=cents policy header. That works with its proxy, not with async logging. Pro costs $79 a month, and usage-based pricing applies.

The gap is the same for all three. A leaked raw provider key, or a script that calls OpenAI directly, never touches the gateway, so its budget never sees that spend. Keep the provider's own limit on as a backstop.

Costbrake: read the bill, brake the source

Costbrake works from the other side. It reads each provider's usage and billing APIs, with read-only keys where the provider offers them, so it sees spend no matter which code or key made it. Pro and Team check every 5 minutes, and as often as every minute during a spike on providers that allow it. Alerts fire on spikes, budget thresholds, month-end forecasts and new charges.

Brakes exist on 18 providers. They never run on their own: an admin clicks one and confirms, and Costbrake records the previous state so it can undo it. A brake can freeze an OpenAI project's hard limit at $0.01, disable an Anthropic key or every key in a workspace, set an OpenRouter key's credit limit to $0, throttle an AWS Lambda function to zero, set a zero Google Cloud spend cap on one service, or pause a Vercel project. What each brake does and how to undo it is on the integration pages, such as AWS, Google Cloud, Azure, Cloudflare, GitHub and Vercel.

Where it is weaker: Costbrake can only act as fast as the provider reports usage, and a person has to make the call. Supabase and 16 other providers are alerts-only. Pro, with brakes, is $12 a month, and Free is $0 for 2 connections with email alerts. See Costbrake pricing.

Which one to use

  • All LLM traffic already goes through your own gateway: set LiteLLM or Portkey budgets per key or team. That is the closest thing to a hard cap per request. The trade-offs are in Costbrake vs LiteLLM.
  • You call OpenAI, Anthropic or OpenRouter directly: turn on the provider's hard limit, then add an alert that reaches you in minutes so the freeze is one click away.
  • Your bill is mostly AWS, Google Cloud or Azure: native caps are narrow and slow. Use them where they exist, and add alerts that watch the whole account.
  • You run many providers: Costbrake covers 35, from cloud to AI APIs. Pair it with each provider's own cap where one exists, and see LLM cost tracking tools if you also need per-request detail.

Questions and answers

Is there one kill switch that stops all my cloud and AI spend?

No. Each provider's cap covers one product, project or key, and gateway budgets only see traffic routed through them. The closest thing to a full stop on one cloud is Google Cloud's documented function that removes billing from a project, which shuts down every resource and can delete them. Most teams combine provider caps with an alerting tool that watches every account.

Do AI gateway budgets stop a leaked API key?

Only if the leaked key is a gateway key. If someone has your raw OpenAI or Anthropic key, they call the provider directly and LiteLLM, Portkey or Helicone never see that traffic. The provider's own hard limit, or disabling the key at the provider, is what stops that spend.

Does Costbrake stop spend automatically?

No. Costbrake alerts you, and an admin decides. A brake runs only after an admin clicks it and confirms, and each brake records the previous state so it can be undone. Brakes are on the Pro and Team plans and cover 18 providers.

How fast do native spending caps react?

It depends on the provider. AWS refreshes budget data up to three times a day, Google Cloud says spend cap enforcement isn't instant, Vercel checks spend every few minutes, and OpenAI says hard limit enforcement isn't instantaneous. Plan for some spend to land after any cap fires.

Sources

Updated