OpenAI and Anthropic API spending limits: how to set them and what they don't cover
Last updated 19 Oct 2026
Short answer: Both providers let you set a monthly spending limit. On OpenAI, set a monthly spend limit for the organization or a project and switch on Enforce a hard limit; without that switch, requests aren't stopped when the limit is reached [O1]. On Anthropic, set your own limit below your tier's monthly cap on the Billing page in the Claude Console, and give each workspace its own limit [A1]. Both limits are monthly, so a runaway job can still use a large share of the month before it's stopped.
Where CostLatch fits
Provider limits are monthly. For tighter limits per run or per day, you can send requests through a proxy that checks a budget before forwarding each one. That's what CostLatch does (disclosure: CostLatch is my product, and this is its site):
- Per-run, daily and monthly dollar caps for each CostLatch key†, checked before a request is forwarded to OpenAI or Anthropic. Over-cap requests are refused.
- It stops exact repeated identical prompts. It doesn't catch every kind of loop.
- It works with any app or agent that lets you set a custom base URL for the OpenAI Chat Completions API or the Anthropic Messages API. It doesn't support the OpenAI Responses API, embeddings or GET /v1/models, and it doesn't work with Cursor or Claude Code.
- What it can't do: it only covers traffic sent through it. A stolen provider key used directly at OpenAI or Anthropic bypasses any proxy, so keep the provider's own spend limit on.
- Key storage: "Your provider key is encrypted with AES-256-GCM before it's stored, and it's only decrypted in memory to forward your request." "Like any proxy, CostLatch has to decrypt your key to use it, so it isn't zero-knowledge: you're trusting me as the operator and Cloudflare as our host. That's why I recommend a dedicated, revocable key." "Create a dedicated OpenAI project key or Anthropic workspace key just for CostLatch, keep the provider's own spend limit on, and you can revoke it at the provider any time."
- Solo or Pro? Solo: 3 keys, 30 days of usage history. Pro: 20 keys, 90 days.
- Pricing: Solo (US$19/month, 3 keys) and Pro (US$39/month, 20 keys) both start with a 7-day free trial for new customers. A card is required, you won't be charged during the trial, and it then renews monthly until you cancel. Local taxes (e.g. GST/VAT) may be added at checkout.
How do I set a spending limit on the OpenAI API?
- For the whole organization: go to Organization limits, choose Edit spend limit under Spend, enter the monthly spend limit, turn on Enforce a hard limit and save [O1].
- For one project: go to Project settings, then Limits, choose Edit spend limit under Spend, enter the monthly spend limit, turn on Enforce a hard limit and save [O1].
- You need permission to manage that organization or project's settings [O1].
- Spend alerts on their own only send a notification, and API traffic continues. They stay active alongside a hard limit, so you can use them as an early warning [O1].
What happens when an OpenAI limit is reached?
- Affected requests return a
429error with the codeorganization_spend_limit_exceededorproject_spend_limit_exceeded[O1]. - OpenAI says enforcement is not instantaneous, so recorded spend can slightly exceed the amount you set [O1].
- Traffic resumes when you raise or remove the limit (after the change propagates), or when the limit resets with the next monthly cycle [O1].
- OpenAI also gives each organization its own approved monthly usage limit based on its usage tier. That's separate from the limits you set [O1].
How do I set a spending limit on the Anthropic API?
- Every Start, Build and Scale tier has a monthly spend cap: US$500, US$1,000 and US$200,000 respectively. Custom-tier organizations have no monthly spend cap [A1].
- To set your own, lower limit: in the Claude Console go to the Billing page, then in Spend limits click Adjust limit (or Set limit) and enter a value. It can't be higher than your tier's cap [A1].
- To protect one project from another, set custom spend limits per workspace. You can't set limits on the default workspace [A1].
What happens when an Anthropic limit is reached?
- Your tier's cap: API usage pauses until 00:00 UTC on the first day of the next month, unless you get a higher limit sooner. Requests return HTTP
429withenforced_spend_limit_reached, and there's noretry-afterheader, so automatic retries keep failing [A1]. - A limit you set yourself: requests return HTTP
400with error typeinvalid_request_error, and the message says when access resumes. Raise or remove the limit to restore access sooner [A1].
What don't provider spending limits cover?
- They're monthly. The pages cited here describe monthly limits, so one bad night can use a big share of the month's budget before the limit trips [O1] [A1].
- They're not instant. OpenAI says recorded spend can slightly exceed the limit [O1].
- Rate limits aren't dollar limits. Rate limits cap how many requests or tokens you can send per minute, not what you spend, so a loop of valid calls can stay under them [A1].
- Alerts don't stop traffic. An OpenAI spend alert notifies you; only a hard limit stops requests [O1].
FAQ
Does OpenAI have a hard spending limit?
Yes. You can set a monthly spend limit for an organization or a project and turn on Enforce a hard limit. Requests then fail with a 429 error once tracked spend reaches it, though OpenAI says enforcement isn't instantaneous [O1].
Do OpenAI spend alerts stop API usage?
No. A spend alert sends a notification and API traffic continues. Only a hard spend limit stops requests [O1].
What happens when I hit my Anthropic spend limit?
If you hit your tier's monthly cap, requests return a 429 error until 00:00 UTC on the first day of the next month, unless you get a higher limit sooner. If you hit a lower limit you set yourself, requests return a 400 error until you raise or remove it or access resumes [A1].
Can I set a daily or per-run spending limit?
The provider pages cited here describe monthly limits. For a daily or per-run dollar limit you need your own code or a proxy that checks a budget before each request, such as CostLatch†. Keep the provider's monthly limit on as well.
Can I limit spending for one project or workspace?
Yes. OpenAI lets you set a spend limit per project [O1]. Anthropic lets you set custom spend limits per workspace, but not on the default workspace [A1].
†CostLatch checks your budget before forwarding each request. Spend can still slightly exceed a cap, for example from requests already in progress or running at the same time, or where our cost estimate differs from the provider's final charge. Keep your provider's own limits on too. See our Terms (cl 3.3).
CostLatch is not affiliated with or endorsed by OpenAI or Anthropic. OpenAI and Anthropic are trademarks of their respective owners.
General information, not security or legal advice. Provider steps were checked against the linked pages on 19 Oct 2026 and can change.