- Symptom
- Spend alert emails arrive but API traffic keeps runningThe month's usage is far above what you planned, with no requests ever refused
- Cause
- Spend alerts only send a notification and do not enforce a cap. Traffic stops at a set amount only when a hard spend limit is enforced on the organization or the project. Without one, usage runs up to the organization's approved usage limit, which OpenAI raises automatically as usage grows.
- Fix
- Set a monthly spend limit with Enforce a hard limit turned on, for the organization and for the project your app's key belongs to, and keep spend alerts below it as early warnings. When a limit is hit, requests fail with 429 and the code organization_spend_limit_exceeded or project_spend_limit_exceeded, so show users a clear message. Enforcement is not instant, so recorded spend can slightly pass the limit.
- Apply
Organization: Organization limits, Spend, Edit spend limit, enter the Monthly spend limit, turn on Enforce a hard limit, Save. Project: Project settings, Limits, Edit spend limit, enter the Monthly spend limit, turn on Enforce a hard limit, Save. // in the app try { await openai.responses.create({ model, input }) } catch (err) { if (err instanceof OpenAI.APIError && err.status === 429 && ['organization_spend_limit_exceeded', 'project_spend_limit_exceeded'].includes(err.code ?? '')) { // tell the user the feature is paused } throw err }- Affected
- OpenAI API organizations and projects without an enforced hard spend limit
- Sources
Last verified 2026-10-27 · Confirmed by 0 builders