Codex
Codex can use an OpenAI-compatible gateway. Configure the OpenAI base URL as UURoute and use your UURoute API key.
Environment Variables
export UUROUTE_API_KEY="<UUROUTE_API_KEY>"
export OPENAI_BASE_URL="https://api.uuroute.ai/"
export OPENAI_API_KEY="$UUROUTE_API_KEY"
Run Codex
Use an OpenAI-compatible model available through UURoute:
codex --model gpt-5-codex
If you want Codex to proceed without additional prompts, use:
codex --model gpt-5-codex --full-auto
For a one-shot prompt:
codex --model gpt-5-codex "Review this repository and summarize the main risks."
Persistent Shell Setup
Add the variables to your shell profile:
export UUROUTE_API_KEY="<UUROUTE_API_KEY>"
export OPENAI_BASE_URL="https://api.uuroute.ai/"
export OPENAI_API_KEY="$UUROUTE_API_KEY"
Restart your shell after updating the profile.
Troubleshooting
| Symptom | Check |
|---|---|
| Authentication error | Confirm OPENAI_API_KEY is set to your UURoute API key. |
| Model not found | Confirm gpt-5-codex or your selected model is available in UURoute. |
| Requests use the default OpenAI endpoint | Confirm OPENAI_BASE_URL is exported before starting Codex. |