The new Codex App uses a third-party API and can’t generate images—here’s the fix.


Recently, many people should have run into this problem:
After integrating the relay station API in the new Codex App, when calling the built-in imagegen skill, the model seems to have already finished generating the image, but the image simply won’t display in the client.
At first I thought the third-party API didn’t return the image correctly. Later, after analyzing Codex’s configuration and request logic, I found that the issue lies in the new client’s permission validation for third-party providers.
It seems there isn’t a relatively complete public solution online yet, so I’ll share the methods we tested that work.
Method 1: Manually modify config.toml
First, find Codex’s configuration file:
Windows:
C:\Users\Administrator\.codex\config.toml
Note: “Administrator” here needs to be replaced with your own Windows username.
For example, if your username is zhang, the path is:
C:\Users\zhang\.codex\config.toml
macOS / Linux / WSL:
~/.codex/config.toml
Before modifying, it’s recommended to back up the original config.toml.
Then change the configuration to:
model_provider = "custom"
model = "gpt-5.6-sol"
review_model = "gpt-5.6-sol"
model_reasoning_effort = "high"
model_context_window = 372000
model_auto_compact_token_limit = 372000
[model_providers.custom]
name = "
wire_api = "responses"
base_url = "Here change to the relay station API URL"
requires_openai_auth = false
experimental_bearer_token = "Here change to the relay station API key"
http_headers = { "x-openai-actor-authorization" = " }
In short, the key is these two settings:
requires_openai_auth = false
http_headers = { "x-openai-actor-authorization" = " }
The former disables the OpenAI official account authentication requirement, and the latter adds the request header that the Codex client needs when outputting the generated image.
Method 2: Use open-source software: CodeStudio-lite to configure
Open-source repository address:
Download address:

This software is made by our team’s tech teammate. They developed an AI tools desktop control console.
It puts local AI tool detection, installation updates, configuration writing, usage queries, and desktop patch processes all into a single application. It can also switch each tool among different vendors and models without repeatedly editing configuration files manually.
At the same time, it was the first to resolve the issue where the new codex app can’t generate images. It’s a good fit for people who don’t want to bother with configuration.
In addition, it also supports a Chinese localization feature for the Claude desktop version.
These are the contents I’ve been able to find so far, and it seems that no one has publicly explained the new Codex App issue where third-party APIs can’t generate images, along with the full modification method, in such detail.
If you run into the same problem, you can try it. Remember to thoroughly restart the Codex App after you finish the changes.
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pinned