Codex Setup
Codex uses local configuration files for provider settings and authentication. To use FlowAPI, configure both:
config.tomlauth.json
Restart Codex after editing both files.
Codex versions differ in their supported wire API. If your Codex build only uses the OpenAI Responses transport, the provider root should be https://api.flowapi.net. If it offers an OpenAI-compatible chat-completions transport, use the /v1 endpoint expected by that Codex version.
1. Edit config.toml
Find or create the Codex config file:
| OS | Path |
|---|---|
| macOS / Linux | ~/.codex/config.toml |
| Windows | %userprofile%\.codex\config.toml |
Use this template:
model_provider = "FlowAPI"
model = "gpt-4o"
review_model = "gpt-4o"
model_reasoning_effort = "medium"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
[model_providers.FlowAPI]
name = "FlowAPI"
base_url = "https://api.flowapi.net"
wire_api = "responses"
requires_openai_auth = trueChange model and review_model to a model ID available in your FlowAPI account.
2. Edit auth.json
Find or create the Codex auth file:
| OS | Path |
|---|---|
| macOS / Linux | ~/.codex/auth.json |
| Windows | %userprofile%\.codex\auth.json |
Use this template:
{
"OPENAI_API_KEY": "YOUR_FLOWAPI_API_KEY"
}Replace YOUR_FLOWAPI_API_KEY with your real FlowAPI key.
3. Restart Codex
Quit Codex fully and open it again. Start a new session and confirm the selected model is the FlowAPI model you configured.
If Codex does not start
- Check that
config.tomlis valid TOML. - Check that
auth.jsonis valid JSON. - Confirm
base_urlmatches the wire API used by your Codex version. - Confirm the configured model exists in FlowAPI.
- Try a lower reasoning effort if the chosen model does not support
medium,high, orxhigh.