What this thread does
Use API-key authentication for complimentary API tokens and enable an enforced project spend limit before starting Codex CLI.
Do first: open the organization's data controls and verify complimentary-token eligibility and enrollment.
1. In the organization's data controls, verify eligibility and enrollment for complimentary daily tokens. Enable input/output sharing only for the intended project, and only for data you have permission to share. A positive balance is required. OpenAI's program rules explain eligibility and exclusions (checked 2026-10-29). 2. In project settings → Limits → Spend → Edit spend limit, enter a Monthly spend limit, turn on Enforce a hard limit, and save. Configure alerts below it. Add an organization hard limit if several projects share the budget. An alert alone leaves traffic running; enforcement can lag. Follow the official spend guide (checked 2026-10-29). 3. Create a key scoped to that project through its API Keys page; see project management. Load it through your normal credential mechanism. With OPENAI_API_KEY already available, use the documented Codex authentication commands:
printenv OPENAI_API_KEY | codex login --with-api-key
codex login status
Confirm API-key authentication before sending a coding request. API authentication follows the API organization's data policy and billing, while ChatGPT sign-in uses subscription access (checked 2026-10-29). 4. Review the program's current model list before selecting a model. The allowance is shared across models within each group and resets at 00:00 UTC. A request that crosses the allowance is billed in full; tool use is excluded. Verify usage with both input and output tokens and the data-sharing incentive service tier in the Usage Dashboard. A monthly monetary cap is a separate control from this daily token allowance (program rules, checked 2026-10-29).
Which access path fits?
| Option | Wins when | Loses when | Pick this if |
|---|---|---|---|
| Project API key with an enforced cap | You qualify for the API offer and need project spending controls | Sharing is unsuitable, you are ineligible, or you need zero possible overage | You accept the API data policy and a delayed monthly spending cutoff |
| ChatGPT sign-in | You want subscription access | Your goal is consuming the separate complimentary API allowance | You want to stay on ChatGPT entitlements |
These are access choices, not a claim that either has unlimited usage. No fixed subscription price or token entitlement is assumed.
For a solo developer, start with one dedicated API project and a conservative enforced cap. For a small team, combine project caps with an organization cap; do not treat each person's daily usage as a separate organization allowance. For an enterprise, first confirm policy permits sharing: the program excludes certain organizations, including Enterprise and Zero Data Retention customers. Use approved access when it does not.
Check the result
Confirm the saved hard-limit switch and active authentication method. In usage records, verify the intended project and incentive tier. Reaching a project cap returns project_spend_limit_exceeded; an organization cap returns organization_spend_limit_exceeded, both with HTTP 429 (spend guide). Do not raise a cap automatically when that happens.
Evidence
mAE7777's forum post, 2026-10-28: “Pre-request token reservations and daily quota enforcement”. This describes the author's own harness, not an independent trial or an OpenAI endorsement. The recipe above uses official controls; no harness installation is required.
Mistakes and limits
Do not confuse alerts, recharge limits, and enforced spend limits. Prepaid billing guidance says a recharge limit controls purchases and a prepaid balance is not an instantaneous cutoff (checked 2026-10-29). Official hard limits also allow some propagation overage. This recipe cannot promise an exact zero-overage bill or daily pre-request reservation enforcement. No enrollment, inference, billing cutoff, or third-party harness was tested.
checked 2026-10-29
Started from a post by @mAE7777, packaged by the editor. Original post