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.
| Tool | What it stops | How fast | What keeps billing | Cost |
|---|---|---|---|---|
| Costbrake brakes | The key, project or workload an admin picks, on 18 providers | When an admin confirms; checks every 5 minutes on Pro | Providers without a brake; usage already billed | Free $0 (no brakes); Pro $12 a month |
| AWS Budgets actions | IAM policies or SCPs; chosen EC2 or RDS instances | Budget data refreshes up to 3 times a day | Anything the action doesn't target | First 2 action budgets free, then $0.10 a day each |
| Google Cloud spend cap | New usage of 1 service in 1 project | Faster than billing reports, not instant | Compute, storage and every other service | No additional charge |
| Google Cloud disable-billing function | Every resource in the project | Pub/Sub budget messages, multiple times a day | Spend before the message lands; resources may be deleted | No additional charge, plus Pub/Sub and function usage |
| Azure spending limit | All deployed services until the billing period ends | When the credit runs out | Not offered on pay-as-you-go or commitment plans | Credit subscriptions only |
| Vercel Spend Management | Production deployments of all projects | Checks every few minutes | Seats, integrations and add-ons | No additional cost on Pro |
| Supabase Spend Cap | Over-quota use of 12 usage items | At the quota | Compute and 10 other items | Included on Pro ($25 a month) |
| GitHub budgets | Metered usage such as Actions, with Stop usage on | When the budget is exhausted | License products like Copilot only alert | Built in |
| OpenAI hard spend limit | API requests in that organization or project (429) | Not instantaneous | Other projects, when the limit is per project | Built in |
| Anthropic workspace spend limit | Requests in that workspace (HTTP 400) | When the limit is reached | The Default Workspace, which can't have one | Built in |
| OpenRouter key credit limit | Requests made with that key | When the credit limit is used up | Other keys | Built in |
| LiteLLM budgets | Requests through the proxy for a key, user or team | Before the request reaches the provider | Traffic that skips the proxy; everything if there is no database | Open source; Enterprise through sales |
| Portkey budget limits | The provider key in Portkey, by expiring it | When the USD limit is reached | Traffic that skips Portkey | Enterprise and select Pro; Production is $49 a month |
| Helicone cost rate limits | Requests through the gateway over a cents quota | Per time window | Async-logged and direct traffic | Pro $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_budgeton 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=centspolicy 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
- Configuring a budget action - AWS Billing and Cost Management
- Managing your costs with AWS Budgets
- AWS Budgets pricing
- Manage spend cap budgets - Google Cloud Billing
- Disable billing usage with notifications - Google Cloud Billing
- Azure spending limit - Microsoft Learn
- Spend Management - Vercel Docs
- Control your costs - Supabase Docs
- Setting up budgets - GitHub Docs
- Managing projects in the API platform - OpenAI Help Center
- Rate limits - Claude Platform Docs
- Management API keys - OpenRouter
- Budgets and rate limits - LiteLLM
- Budget limits - Portkey Docs
- Custom rate limits - Helicone Docs
Updated