Inference Cheap

Connect Codex

Use your Inference Cheap key in Codex CLI or the app.

Configure Codex

Paste this block at the start of ~/.codex/config.toml (or $CODEX_HOME/config.toml), before any [section], and replace YOUR_API_KEY with your key. If the file already has inference_cheap settings, replace them instead of adding a second copy.

# <inference_cheap>

model_providers.inference_cheap.experimental_bearer_token = "YOUR_API_KEY"

model_providers.inference_cheap.name = "OpenAI"
model_providers.inference_cheap.base_url = "https://codex.inference.cheap"
model_providers.inference_cheap.wire_api = "responses"
model_providers.inference_cheap.supports_websockets = false
model_provider = "inference_cheap" # Set to "openai" to connect to OpenAI directly.

# </inference_cheap>

Start a task

Restart Codex and start a new chat. Existing chats keep their old provider; fork one to continue it through Inference Cheap.

Troubleshooting

  • Config error: remove duplicate keys and put the block before any section.
  • Auth error: check your key.
  • Codex still uses another provider: check profile and project overrides.

On this page