OpenAI gives you two controls for API spending: spend alerts and hard spend limits. Both are worth setting today. Both also leave gaps that are good to know about before a loop or a leaked key finds them.
The two controls
- Spend alert: tells you when this month's API spend reaches an amount you choose. It does not stop anything.
- Hard spend limit: when tracked spend reaches the amount, API requests fail. Organization limits return HTTP 429 with
organization_spend_limit_exceeded; project limits return 429 withproject_spend_limit_exceeded.
You can set both for the whole organization or for one project. A project can still be stopped by the organization limit if that one is reached first. Limits reset with the next monthly cycle, or when you raise or remove them.
How to set them
- For the whole organization, open Settings → Organization → Limits on platform.openai.com. For one project, open that project's Settings → Limits.
- Choose Spend → Edit spend limit and enter a monthly amount.
- Turn on Enforce a hard limit if you want requests to stop at that amount, then save. You need permission to manage that organization or project.
Set the alert below the hard limit. The alert gives a person a chance to act; the hard limit is the last line.
What they miss
1. They watch the total, not the speed
A $500 limit says nothing while a bug spends $40 an hour; it only acts once the month's total reaches $500. A loop that starts on Friday evening can use most of the month's budget before Monday. Speed is the earlier signal: spending at 20 times your normal rate is a problem long before it is a large total.
2. Stopping is not instant
OpenAI says enforcement is not instantaneous: some extra usage can be processed while the limit takes effect, so recorded spend can go a little over the amount you set. Plan for a margin.
3. A hard limit is an outage
When the limit is reached, every request in that project or organization fails, the good ones too. Many teams set the limit high to avoid that, which makes it less useful as an early warning.
4. It only covers OpenAI
If you also pay Anthropic, OpenRouter, Vercel or Cloudflare, each has its own dashboard and its own (often different) alert options. Nobody is watching all of them together.
A setup that covers both
- Put each app in its own OpenAI project, so a limit stops one app, not all of them.
- Set a project hard limit as a ceiling, around two or three times a normal month.
- Set a spend alert at about one normal month.
- Watch the speed. Billeak reads your OpenAI token usage, which OpenAI reports close to real time, and warns you when it rises far above your own normal, by email, Telegram, Slack, Discord or a signed webhook. The webhook lets your code switch off just the expensive feature instead of hitting the hard limit for the whole project. Cost totals arrive from OpenAI once a day, and the app says so.
Billeak is free for two providers and only needs a read-only admin key. Start free, or read how we handle keys.