>_

Flux for Codex

Keep Codex. Give it 90+ models from 12 AI labs on one key, plus page reading and images through the Flux tools server.

Set it up

Flux Desktop can write this config for you in one click. To do it by hand:

  1. Add a Flux model provider to your Codex config. ~/.codex/config.toml

    ~/.codex/config.toml
    model = "flux-auto"
    model_provider = "flux"
    
    [model_providers.flux]
    name = "FluxRouter"
    base_url = "https://api.fluxrouter.ai/v1"
    env_key = "FLUX_API_KEY"
    wire_api = "responses"
  2. Export your Flux key, then run Codex.

    bash
    export FLUX_API_KEY="sk-YOUR-FLUX-KEY"
    codex

This recipe comes from our earlier Codex guide. We have not re-checked it against the newest Codex release yet.

Check the first call

  1. Run codex and send "Reply with the word ready."

  2. Open Activity in your Flux account to see the call counted against the model that answered and the key that made it.

What Codex gets

What Codex gets through Flux
AbilityTodayHow it reaches Codex
Every major modelLiveAutomatic, through the base URL.
Read a web pageLiveAdd the Flux tools server (below).
Search the webRolling outSwitched on and being checked. Not promised yet.
Make imagesLiveAdd the Flux tools server (below).
SpeakRolling outSwitched on and being checked. Not promised yet.
Transcribe audioNot in agents yetLive on the API for your own code. No agent reaches it yet.
Act in your appsShippingNot live yet. It is on the way.
MemoryShippingNot live yet. It is on the way.
Second opinionRolling outSwitched on and being checked. Not promised yet.

Statuses come from the same record as the abilities on the homepage, so they change everywhere at once.

Add the Flux tools server

Page reading and image making reach Codex through the Flux tools server, an MCP server on the same key. Web search joins it once it is live.

  1. Add the Flux tools server to the same config. Codex reads the key from FLUX_API_KEY, which you exported above. ~/.codex/config.toml

    ~/.codex/config.toml
    [mcp_servers.flux-tools]
    url = "https://api.fluxrouter.ai/mcp-tools/"
    bearer_token_env_var = "FLUX_API_KEY"

Format from Codex’s own MCP docs, read on 28 September 2026.

Good to know

  • Codex only speaks the Responses API, so wire_api must be "responses". Flux serves it at the same base URL.
  • The provider IDs openai, ollama and lmstudio are reserved. Use a custom ID such as flux.
  • flux-auto bills at the Standard rate, or the Fast rate when it sends your request to the Fast lane and a Fast model answers. Never more than Standard. Pin a model and you pay that model’s rate instead.
  • Flux can pick a different model from one request to the next. A prompt cache belongs to one model, so a switch can mean a cache miss. If a long session leans on caching, pin a model.
  • The Flux tools server needs a funded key. Without one, its tools return an error instead of a result.

If it won’t connect

Codex connects, but every call fails.
Codex only speaks the Responses API. Set wire_api = "responses", and keep the base URL ending in /v1.
Codex refuses the provider block.
The provider IDs openai, ollama and lmstudio are reserved. Name the block [model_providers.flux], and set model_provider = "flux" to match.
Every request comes back 401.
The key is missing, mistyped, or an old provider key is still set and wins. Paste your Flux key again and remove any other provider key from this config.
Requests come back 402.
Your account has reached its spend ceiling. Add funds or raise the ceiling in your Flux account, then try again.

More fixes: my tool won’t connect.

Try this next

Release notes
Write release notes for everything merged this week, make a cover image, publish them and tell the team.

Some steps in this job use abilities that are still shipping, so Codex does part of it today.