If you use the OpenAI API Platform for coding agents or apps, these two controls do different jobs. Confusing them is how “I thought I had a cap” turns into a surprise invoice—or a production outage.
The difference (official behavior)
Control
At the threshold
Use when
Spend alert
Sends a notification; API traffic continues
You want warning time
Hard spend limit
Affected requests return 429 with organization_spend_limit_exceeded or project_spend_limit_exceeded
Important: Enforcement is not instantaneous—recorded spend can slightly exceed the configured amount while limit state propagates. OpenAI also assigns a separate approved monthly usage limit by usage tier; that is not the same as the spend limit you configure.
How to set a monthly spend limit
You need permission to manage org or project settings (see OpenAI API Platform permissions).
Organization
Go to Organization limits.
Under Spend, select Edit spend limit.
Enter the Monthly spend limit.
To fail API responses after the limit, turn on Enforce a hard limit.
Org hard limits apply across projects; project hard limits apply only to that project’s billed traffic. Either can 429 a request.
Recommended pattern
Set a spend alert well below your budget (for example around 70–80%) so you have time to react. This is our suggestion, not an OpenAI default.
Set a hard limit at 100% only if you accept production stoppage.
Track coding-tool subscriptions (Cursor, Claude plans, ChatGPT plans) separately. OpenAI API spend limits only cover API Platform usage.
If traffic already stopped
Read error.code: organization_spend_limit_exceeded, project_spend_limit_exceeded, organization_usage_limit_exceeded (the OpenAI-approved limit), or credit_balance_exhausted.
Raise or remove the spend limit you hit, request a higher approved usage limit, or add credits, depending on the code. Otherwise the spend limit resets with the next monthly cycle.
Wait for propagation before assuming it’s fixed.
Need alerts across OpenAI + Anthropic + local CLI exports?
SpendLens is in development (waitlist only). It is planned as a hosted budget alarm that warns you before you run out, not another cost dashboard. Planned pricing Solo $9 / Pro $19; not charging yet.