OpenAI spending limit

How to set a hard spending limit on the OpenAI API

You can set a hard spending limit on the OpenAI API by using prepaid billing with auto-reload disabled, or by turning on the "Enforce a hard limit" toggle on your monthly project and organization budgets. A new prepaid account starts with a minimum credit purchase of $5, and the entry-level Build usage tier caps overall monthly spend at $500 / month.

Neither mechanism cuts off traffic instantaneously. Enforcement delays mean recorded usage can slightly overshoot your target or leave you with a negative balance, but configured correctly, both methods will stop unexpected usage from running up a runaway invoice.

Prepaid credits as a natural spending cap

New OpenAI API accounts use prepaid billing, where credits are purchased before using the API and the credit balance decreases as you make calls. If your account already uses monthly invoice billing, you can still buy credits in advance to offset that monthly invoice, but for anyone looking to avoid surprises, paying upfront provides the most direct floor. If you have any free grant credits on the account, OpenAI consumes those before touching your purchased balance.

The trap is that OpenAI turns on automatic recharges during onboarding. When setting up prepaid billing for an organization, the minimum initial purchase is $5 and the default is $10. Right on that payment screen, the "Use auto-reload" setting is checked by default. If you leave it alone, OpenAI automatically charges your card whenever your balance dips, which completely defeats the purpose of using prepaid credits as a budget ceiling. You have to explicitly switch auto-reload off if you do not want automated charges hitting your card.

If you choose to leave auto-reload on for operational convenience, you can configure three distinct values: the balance threshold that triggers a purchase, the target balance you want to restore to, and an optional monthly reload limit. Auto recharge adds credits when the balance falls below your threshold, with a minimum reload amount of $5 and a maximum ceiling determined by your account's trust tier.

Keep in mind that an automatic reload limit is not an API spending cap. It only restricts automated card transactions within that calendar month; it doesn't limit how fast you burn through credits you already bought, nor does it count manual credit top-ups made in the dashboard. If an automatic reload is triggered and the configured refill amount would push you past your remaining monthly reload limit, OpenAI only adds the remaining allowed portion, provided that amount meets the $5 purchase minimum. Once that monthly reload ceiling is reached, automatic recharges simply shut down until the first day of the next month.

Enforcing hard limits at the organization and project level

If you want an explicit monthly dollar limit rather than relying purely on an empty credit tank, you can configure spend limits inside your account settings. OpenAI lets you configure monthly spend limits at two separate tiers: the entire organization, and individual projects.

Every organization comes with a Default project that cannot be deleted. It inherits the organization's settings, but you can set custom rate limits, virtual model permissions, and spend limits directly on it. An Organization Owner can create up to 2,000 projects by default, and they have permission to configure spend limits across the entire organization as well as on any individual project. If you assign someone the Project Owner role instead, they can adjust spend limits and manage settings for their assigned project, but they cannot alter the organization-wide budget.

Organization Owner
└── Can set Organization Spend Limits
└── Can create up to 2,000 projects
└── Can set Spend Limits on any Project (including Default)

Project Owner
└── Can set Spend Limits on their specific Project only

By default, an OpenAI spend limit only tracks usage; it does not block anything. If you set a project budget to $50 and do nothing else, requests will sail straight through that number. To actually halt traffic, you must explicitly enable the "Enforce a hard limit" toggle in that project or organization's settings.

When "Enforce a hard limit" is active, API requests begin failing once tracked spending crosses the threshold. However, enforcement is not instantaneous. Usage data takes time to process, which means recorded spending can slightly exceed the configured limit before the gateway starts rejecting requests.

You can also set spend alerts alongside your hard limits. Spend alerts send an email notification when a specific threshold is hit, but alerts never stop traffic. Organization owners and project owners get these emails automatically, and you can add extra recipient email addresses in the alert configuration. If you receive an alert and notice requests are still going through after your budget was hit, check the configuration immediately; if "Enforce a hard limit" was left off, the budget was simply monitoring the spend while the API kept serving calls.

Usage tiers and account-level ceilings

Separate from your prepaid balance and any custom project limits you configure, OpenAI enforces organization usage tiers. Your trust tier is based on your overall usage and payment history, and it determines two things: your maximum permitted credit balance, and your hard monthly usage ceiling across all models.

OpenAI organizes these tiers into distinct brackets based on your cumulative payment history:

Usage tierTotal credit purchases requiredMonthly usage limit
Build$5 in total credit purchases$500 / month
Launch$100 in total credit purchases$5,000 / month
Grow$500 in total credit purchases$200,000 / month

These monthly usage limits act as an absolute platform ceiling. Even if you deposit cash into your account, you cannot spend more than your tier's monthly limit within a billing cycle. At the same time, your prepaid balance is completely independent of these tier ceilings and your request or token rate limits; a high tier allows higher throughput, but your prepaid balance still determines how many calls you can actually pay for.

What happens when credits run out

When a prepaid organization runs out of credits, subsequent API calls fail with an HTTP billing error containing the code credit_balance_exhausted. That error indicates that your organization has zero prepaid credits remaining.

Do not expect the API to shut down at the exact cent your balance hits zero. OpenAI explicitly warns users not to rely on the prepaid balance as an instantaneous spending cutoff. Because usage reporting carries a processing delay, requests that are in-flight or submitted right as the balance runs dry can still be processed. This delay can push your credit balance into a negative number.

When your account incurs a negative balance, OpenAI does not send a separate bill to collections; instead, that negative amount is deducted directly from your next credit purchase. If you had an automatic reload configured and that payment fails, OpenAI sends an email alert, and your API calls halt once the available balance is completely exhausted, again subject to the standard processing lag.

If your code receives a 429 or 503 error response triggered by quota exhaustion or billing issues, your application should not retry the request. Retrying these errors only floods your own application logs and consumes client resources, because quota errors require an administrative action, such as purchasing additional credits or waiting for a monthly reset, before any request can succeed.

Finally, keep track of when you buy credits. Purchased credits expire after exactly 1 year. OpenAI documentation states that they cannot extend the expiration date of purchased credits or credit grants under any circumstances, and purchased credits are non-refundable unless required by applicable law, your contract, or an approved exception.

Opt-in killswitches with Costbrake

If you are running production workloads where waiting for OpenAI's standard threshold processing feels too loose, you can monitor your infrastructure with Costbrake. Costbrake monitors spending across 23 cloud and AI providers, checking your usage hourly on the Free plan, every 5 minutes on Pro and Team, and every 2 minutes during an active spike. A spike is triggered whenever an hour costs more than three times your usual 7-day baseline and at least $5 more than normal.

For OpenAI, Costbrake connects via an Admin key to read the Usage and Costs APIs. A Read only Admin key cannot invoke models or generate API keys, making it safe for continuous monitoring. If you choose to enable Costbrake's opt-in brake killswitch on Costbrake pricing plans like Pro or Team, you provide a separate Admin key with write permissions to spend limits.

Costbrake never executes a brake automatically; an admin must click and confirm the action in the dashboard. When triggered, the OpenAI brake immediately resets the project or organization monthly hard spend limit down to $0.01. Once OpenAI enforces the new limit (which usually takes a few minutes), any subsequent paid API request fails immediately with a 429 status code, blocking downstream runaway traffic until you choose to undo the brake. You can read more about how caps work across other platforms in our guide on which cloud and AI providers let you set a hard spending cap.

Questions and answers

Can I set a hard spending limit on the OpenAI API?

Yes, you can enforce hard limits by purchasing prepaid credits with auto-reload turned off, or by navigating to your organization or project settings and enabling the "Enforce a hard limit" toggle on a monthly budget. If that toggle is not turned on, the budget only monitors spend without stopping traffic.

What happens when my OpenAI prepaid credits run out?

When your prepaid balance reaches zero, API requests begin failing with a billing error returning the error code credit_balance_exhausted. Because enforcement is not instantaneous due to processing delays, in-flight calls can still complete, which may leave your account with a temporary negative balance that gets deducted from your next top-up.

Do OpenAI project spend limits stop API requests by default?

No, spend limits monitor your spending without blocking API traffic unless you explicitly enable the "Enforce a hard limit" option. Project spend alerts also only deliver email notifications to project owners and configured recipients; they do not cut off active requests.

Do purchased OpenAI API credits expire?

Yes, purchased credits expire after 1 year, and OpenAI policy states they cannot extend expiration dates for credits or grants. Unused credits are non-refundable unless an approved exception applies or a refund is mandated by law or contract.

What is the minimum amount of credits I can buy on OpenAI?

When setting up prepaid billing, the minimum initial purchase is $5, with a default selection of $10. Automatic recharges also have a minimum recharge amount of $5.

Sources

Updated