Built-in gpt-image-2 returns 403 INSUFFICIENT_BALANCE while 21% weekly Codex usage remains
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using?
Codex Desktop bundled CLI: codex-cli 0.152.1
System CLI: codex-cli 0.152.1
What subscription do you have?
ChatGPT Pro. The Codex usage dashboard reports approximately 21% weekly usage remaining (79% used), rateLimitReachedType: null, and spendControlReached: false. Purchased credit balance is 0.
What platform is your computer?
macOS 27.0, Apple Silicon (arm64).
What issue are you seeing?
Codex built-in image generation consistently fails immediately with:
403 Forbidden
{"code":"INSUFFICIENT_BALANCE","message":"账户余额不足。"}
This report concerns the built-in Codex image-generation path using ChatGPT authentication and gpt-image-2. No API key or Image API path is being used.
The same ChatGPT Pro account can generate images successfully in regular ChatGPT on the web. In Codex, regular tasks continue to work and the usage dashboard still shows approximately 21% of the weekly Codex allowance remaining. However, every built-in image-generation request is rejected because the purchased-credit balance is 0.
This appears inconsistent with the documented behavior that built-in image generation counts against the normal Codex usage limit and should only consume purchased credits after included usage is exhausted.
What steps can reproduce the bug?
- Sign in to Codex Desktop with a ChatGPT Pro account.
- Confirm that the Codex usage dashboard shows included weekly usage remaining.
- Request a minimal image using Codex built-in image generation, for example: “Generate exactly one small matte blue sphere on a seamless white background.”
- Observe an immediate
403 INSUFFICIENT_BALANCEresponse. - Generate an image in regular ChatGPT web using the same account; it succeeds.
The failure was reproduced multiple times. Restarting Codex Desktop and fully signing out and back in did not change the result.
What is the expected behavior?
While included Codex usage remains, built-in gpt-image-2 requests should consume that included allowance and return an image.
If image generation has a separate entitlement or minimum-balance requirement, the Codex usage UI and documentation should display it explicitly instead of showing available weekly usage while the image backend returns INSUFFICIENT_BALANCE.
Additional information
This may be related to the broader entitlement/metering-state inconsistency described in #38603, although this report is specifically about the built-in image-generation endpoint while normal Codex turns continue to work.
Private account or billing identifiers can be provided to OpenAI Support if required, but are intentionally omitted from this public issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report does not identify a repository file, test, or entry point for the built-in image-generation entitlement path. Start by locating where ChatGPT-authenticated image requests or usage entitlements are handled; done means reproducing the request with included weekly usage and resolving the balance mismatch or documenting the separate requirement.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100