Set a Hard Spend Ceiling for Codex at OpenAI
MarginFront meters what your team spends on Codex and can pause work on machines where it’s installed. That’s a guardrail, not a wall. The stops nobody at your company can remove are the ones OpenAI runs on its own servers. This page shows you which of those you’re allowed to set, based on how your company pays for Codex, and exactly where to set it. OpenAI’s stops fail closed: the server refuses the request. MarginFront’s device cap fails open: it’s a guardrail, never a wall.Everything here was checked on 2026-07-28 and every claim carries its source link. OpenAI changes these controls. Open the linked page yourself before you commit a budget to it.
Fail closed vs fail open (read this first)
Two kinds of limit. The difference is the whole point of this page. Fail closed is a locked door. The stop lives on OpenAI’s servers. When the number is hit, OpenAI refuses the request. Nobody at your company can argue past it, because the thing saying no isn’t on their laptop. If it breaks, it stays shut. Fail open is a seatbelt. MarginFront’s device cap runs on the developer’s own machine. When the cap is hit it pauses work and tells them to come find you. If the check can’t read its data, if the machine is offline, if somebody uninstalls it, work keeps going. A broken guardrail should never brick a developer’s day, so it doesn’t. Which do you want? Both, for different jobs.- You want fail closed for the number you’d have to explain to your board. One ceiling at OpenAI, set once, that nothing gets past.
- You want fail open for the day-to-day. Per-developer visibility, a weekly budget, and a nudge that stops a runaway session long before it becomes the board conversation. That’s Track Claude Code & Codex Spend.
Find your billing mode first
Every lever below depends on this one answer. Ask whoever pays the OpenAI bill.
A team can be in more than one mode at once (some developers on API keys, some on personal Plus seats). Each mode needs its own ceiling. A ceiling in one mode does nothing for the others.
Free and Go personal seats include Codex too. For a ceiling they work like ChatGPT Plus and Pro: no admin lever.
Source: Codex pricing, retrieved 2026-07-28: “ChatGPT Work and Codex are included in your ChatGPT Free, Go, Plus, Pro, Business, Edu, or Enterprise plan.”
API key billing
This is the strongest lever OpenAI offers. It’s a real hard stop, and it’s the only mode with a documented way to set that stop from code. What it does. You set a monthly spend limit on your organization, on an individual project, or both. Turn on Enforce a hard limit and OpenAI stops serving traffic at that number: “When tracked spend reaches an applicable hard limit, affected API requests return a429 error with the insufficient_quota code.”
Hard stop or alert? Hard stop, at OpenAI. Spend alerts are the separate, softer control on the same page: an alert “Sends a notification; API traffic continues.” Alerts don’t enforce a cap. You can run both, so an email warns you before the wall arrives.
Where to click.
- Go to Organization limits (
https://platform.openai.com/settings/organization/limits). - Under Spend, select Edit spend limit.
- Enter the Monthly spend limit.
- Turn on Enforce a hard limit. This step is the one that makes it a wall instead of a note.
- Select Save.
/v1/organization/spend_limit. The amount is in cents, so the example below sets $100 a month.
An Admin key isn’t a developer key. It can change your billing controls. Keep it in your secret manager and run this from a machine you control. It never belongs on a developer’s laptop, and MarginFront never asks for it.The limits of this limit.
- Monthly only. The cap covers a monthly cycle and resets with the next one. There’s no weekly or per-developer version here.
- It overshoots a little. OpenAI is explicit: “Enforcement is not instantaneous. The API Platform can process a small amount of extra usage while the limit state propagates, so recorded spend can slightly exceed the configured amount.” Treat the number as a ceiling with a small ledge on top, not a razor line.
- Turning it back on takes a moment too. “Raising or removing the reached limit allows traffic to resume after the update propagates.”
- Two limits can both apply. An organization hard limit covers traffic across every project. A project hard limit covers only that project. Reaching either one returns the
429. - Your tier’s usage limit is a separate thing. OpenAI also assigns your organization an approved monthly usage limit based on its usage tier. That isn’t the limit you set, and hitting it looks different when you’re diagnosing a
429.
ChatGPT Enterprise and Edu
Two separate controls, and you want both. One caps what each person can use. The other caps how far the whole workspace can run past its plan. What it does.- Usage limits set a monthly limit for each user. You can apply a workspace default, group defaults, and per-user overrides on top. Only workspace admins and owners can configure them.
- The workspace overage limit caps eligible usage beyond your committed plan. Set it to 0 and the workspace can’t go into overage at all. Leaving it on “No limit” means no cap is configured on eligible overage usage. “No limit” doesn’t make credits free; eligible overage usage continues and may be billed under your agreement.
chatgpt.enterprise.usage_limit.readto read the current usage-limit settings.chatgpt.enterprise.usage_limit.writeto change them.
- Monthly only, same as every other ceiling on this page.
- “Eligible workspace” isn’t defined publicly. Confirm with your OpenAI account contact that your workspace has the Spend Controls API before anyone plans work around it. The console controls are the safe assumption; the API is the one to verify.
- The API’s exact routes sit behind an authenticated reference. You need to be signed in as an admin to read them, so budget a little time before writing any automation.
- This covers ChatGPT workspace usage, not your API Platform bill. If you also run API keys, that’s a second ceiling in a different place. See API key billing.
OpenAI’s help center blocks automated readers. We confirmed the linked article’s contents through a rendering proxy on 2026-07-28. Open it in a browser yourself before you set policy off it.Sources: Manage usage limits and overages in ChatGPT Enterprise and Edu and ChatGPT usage limits and spend controls, both retrieved 2026-07-28.
ChatGPT Business
By default, all seats and users have no limits specified. If nobody has been into these settings, your Business workspace has no ceiling at all. Check this before you assume a previous admin set one. What it does. You set a credit maximum per seat type, and you can override it for individual people. It’s the console equivalent of the Enterprise usage limits, one tier down. Hard stop or alert? A configured credit maximum is a limit at OpenAI, not a notification. The catch is entirely the default: unset means unlimited, so the control only helps once somebody sets it. Where to click.- Go to Workspace settings, then Billing.
- Find the seat type you want to cap and select Add to set a credit maximum.
- To cap one person instead, select Manage on that seat type, then Add to set that person’s limit. A per-user limit overrides the seat-type limit.
- Console only. The Spend Controls API is an Enterprise and Edu feature. On Business, somebody sets these by hand, so put a calendar reminder on reviewing them.
- Monthly only, same as the rest.
- Unset is the dangerous state, and it’s also the shipped state.
ChatGPT Plus and Pro
There’s no admin lever here. Plus and Pro are personal plans. OpenAI publishes spend controls for API Platform organizations and for Business, Enterprise, and Edu workspaces. It publishes no admin spend-limit control for a personal Plus or Pro seat, because there’s no admin console over somebody’s personal account. What you actually get. The plan’s own usage limits, which are OpenAI’s product limits and not your budget, plus the option for the user to buy more credits when they run out. Buying more credits is the opposite of a ceiling. What to do instead. Two honest options.- Move those developers to a billing mode that has a ceiling. An API key on your organization, or a Business, Enterprise, or Edu workspace seat. This is the only way to get a fail-closed stop for their Codex work.
- Accept a fail-open guardrail and know what you bought. MarginFront’s device cap meters the spend and pauses work on machines where it’s installed. A developer can take it off, and it can’t see a machine that never installed it. For personal seats it’s the only control that exists, and it’s a seatbelt.
What none of these do
True in every mode above. Worth knowing before you promise a number to anyone.- Monthly only. Every OpenAI ceiling here runs on a monthly cycle. You can’t express “$200 per developer per week” at OpenAI. That shape of budget has to live somewhere else.
- One provider only. An OpenAI ceiling caps OpenAI. It knows nothing about what your team spends with Anthropic, Google, or xAI, so it can’t be your whole-company AI budget.
- Alerts notify. They don’t stop. The documented notification channel for spend alerts is email. An alert is a heads-up, not a brake.
- Codex has no dollar cap of its own. There’s no “cap Codex at $X” switch inside Codex. Every stop above is an account control that Codex activity draws against. OpenAI says it plainly about the workspace controls: they “aren’t a universal Codex limit system and don’t govern OpenAI API Platform billing.”
- Enforcement isn’t instant. Expect a small overshoot on the way up and a short delay on the way back down after you raise a limit.
Belt and suspenders
The two controls do different jobs, and neither one replaces the other.
Set the ceiling at OpenAI for the number that would actually hurt. Run the daily budget with Track Claude Code & Codex Spend, and set those caps from code with MarginFront’s Spend Controls API. You’re still responsible for your real OpenAI charges either way.

