How do I use gpt-image-2 in Codex?
How do I use gpt-image-2 in Codex?
gpt-image-2.Keep gpt-5.6, or another conversation and coding model, as the Codex main model. When you ask for an image, Codex calls gpt-image-2 in the background.Step 1: Configure Codex normally
Follow the Codex setup guide to connect Codex to ruoli:Step 2: Enable image generation
Open CC Switch and go to Codex → Edit Provider → Config JSON.Find the active[model_providers.your-provider-name] section and add these two lines:
Step 3: Describe the image to Codex
You do not need an API command or a model switch. Ask Codex directly:gpt-image-2 automatically.gpt-pro group. If you get a “no available channel” error, check that the token uses the correct group.How do I call the image generation API?
How do I call the image generation API?
Direct API example
Replacesk-YOUR_KEY with your token, then run:prompt describes the image. Replace it with your own description.New to coding? Let an Agent configure it
Paste the following prompt into Codex or another coding Agent. Replacesk-YOUR_KEY with your token:How do I enable Fast mode in Codex?
How do I enable Fast mode in Codex?
priority service tier.Open the Codex Config JSON
Add the Fast mode setting
model and model_reasoning_effort, then add this line:
Save and restart Codex
service_tier = "priority" line and restart Codex.How to fix 401 Invalid token after updating Codex
How to fix 401 Invalid token after updating Codex
Open the Codex Config JSON
~/.codex/config.toml directly.Find the active provider
model_provider value near the top of the file:Enable OpenAI authentication
Save and restart Codex
401 Invalid token error should normally be gone.401 Unauthorized: Invalid token errors that started after updating to version 149. If the error remains, check whether the API Key is correct, active, and free of leading or trailing spaces.What should I do if I see Stream disconnected before completion?
What should I do if I see Stream disconnected before completion?
Check your network
- Turn your proxy or VPN off and on again
- Switch to another proxy node
- Switch between Wi-Fi and a mobile hotspot
- Send the same question again after the connection recovers
Check whether the conversation is too long
Check whether the request triggered a safety refusal
Check the relay service
Low cache hit rate or unexpectedly high cost in Claude Code?
Low cache hit rate or unexpectedly high cost in Claude Code?
env:How do I check my balance with an API Key?
How do I check my balance with an API Key?
sk-YOUR-KEY with your Key):total_available in the response by 500000 to get the remaining amount in CNY. For an unlimited token, turn on Allow querying user quota first to see your account balance. See Check Your Balance.
