Can you set a hard spending limit on the Claude API?
Yes, at three levels. The Start, Build and Scale usage tiers each carry a monthly spend cap: $500, $1,000 and $200,000. Below that, you can set your own organization limit on the Billing page in the Claude Console, and a limit per workspace. When usage reaches a limit you set, requests return HTTP 400 with invalid_request_error. When the organization hits its tier cap, requests return HTTP 429 with rate_limit_error until 00:00 UTC on the first day of the next month.
| Control | Set where | What stops | How it ends |
|---|---|---|---|
| Tier spend cap | By Anthropic: Start $500, Build $1,000, Scale $200,000 a month | All API usage, with HTTP 429 | The first of next month at 00:00 UTC, or a higher tier |
| Organization spend limit | Billing page, below the tier cap | All requests, with HTTP 400 | Raise or remove the limit |
| Workspace spend limit | Per workspace, never the default one | That workspace's requests, with HTTP 400 | Raise or remove the limit |
| Costbrake key brake | Costbrake, by your admin | One key, or up to 60 keys in a workspace | Undo sets them back to active |
The gaps: you can't set a spend limit on the default workspace, and a monthly limit set at your real budget still lets a leaked key spend that whole budget first. How to cap your Claude API spend covers each setting.
What Costbrake reads from Anthropic
Costbrake pulls the usage report in hourly buckets, split by model, workspace, service tier, speed and inference region, and fills the current hour from minute buckets when the hourly report has not caught up. It prices those tokens at list prices, including cache writes and reads, Batch, fast mode and US-only inference, to estimate live spend. The daily cost report then replaces the estimate; Costbrake refreshes it every 3 hours.
Anthropic says usage and cost data typically appears within 5 minutes of a request finishing, though it can take longer. Priority Tier usage shows as tokens with no extra cost, and Anthropic's cost report leaves Priority Tier costs out too. Code execution and Managed Agents session charges only appear in the daily billed costs.
Which Anthropic key does Costbrake need?
An Admin key from Settings, Admin keys in the Claude Console. Only organization members with the admin role can create one, and the Admin API is unavailable for individual accounts, so set up an organization first. Console Admin keys have no selectable scopes: every key has full access to the endpoints that accept Admin keys. The secret starts with sk-ant-admin01- and Anthropic shows it only once.
Because the key can switch API keys off, store it like any admin credential. Costbrake only uses it to change a key's status when your admin runs a brake. If a coding agent sets up Costbrake through agent setup, it sends you a connect page and you paste the Admin key there yourself.
How the Anthropic brakes work
- An admin turns on the killswitch for the Anthropic connection. No second key is needed.
- Costbrake lists your workspaces and API keys with their status, read from the Admin API.
- The admin picks one key or one workspace and types the connection's name to confirm.
- Costbrake sets the key, or every active key bound to that workspace, to inactive.
- Undo sets exactly those keys back to active. Keys that were archived or expired in the meantime stay off.
Costbrake refuses to brake a key that is already inactive, archived or expired, and it never deletes or archives a key.
What Costbrake can't do on Anthropic
- Stop spend on its own. Alerts are automatic; a brake always waits for an admin.
- Change your Anthropic spend limits. The brakes switch API keys off and on; your limits stay as you set them.
- Stop Console usage or organization-wide keys with the workspace brake.
- Show Priority Tier cost, or code execution and Managed Agents session charges, before the daily cost report.
If a key has leaked, brake it first and rotate it after. What to do in the first hour after an API key leaks has the full order, and How Claude API credits work explains what happens when prepaid credits run out.
Questions and answers
Does Anthropic have a read-only Admin key?
No. Claude Console Admin keys have no selectable scopes, so every Admin key has full access to the endpoints that accept Admin keys. Costbrake uses it to read usage and cost reports, and to switch API keys off and on only when an admin runs a brake.
Does Costbrake disable Claude API keys automatically?
No. Costbrake sends spike, budget and forecast alerts automatically, but a brake only runs when an admin of your Costbrake workspace picks a key or workspace and types the connection name to confirm.
How fast does Costbrake see Claude API spend?
Anthropic says usage data typically appears within 5 minutes of a request. Costbrake checks every 5 minutes on Pro and Team, every minute for 2 hours after a spike alert, and every hour on Free.
What error does the Claude API return at a spend limit?
A spend limit you set returns HTTP 400 with invalid_request_error, and the message starts with "You have reached your specified API usage limits". The tier's monthly cap returns HTTP 429 with rate_limit_error and the error code enforced_spend_limit_reached.
Can Costbrake connect an individual Claude Console account?
No. Anthropic's Admin API is unavailable for individual accounts, and Costbrake needs an Admin key. Set up an organization on the Organization page in the Claude Console, then create the Admin key as an organization admin.
Sources
Updated