Skip to content
InferenceHub

Codex

OpenAI's CLI agent, on the OpenAI Responses wire. Reaches: the GPT & Codex models — the gpt-5.x-codex family, GPT-5.6 (Sol, Terra, Luna), and the GPT-5.4 family.

Install: npm install -g @openai/codex (verify with codex --version).

1

Add the provider to ~/.codex/config.toml

The provider's base_url must end in /v1, and wire_api must be responses — Codex is Responses-only:

# ~/.codex/config.toml
model = "gpt-5.3-codex"
model_provider = "inference-hub"
[model_providers.inference-hub]
name = "InferenceHub"
base_url = "https://app.inferencehub.tech/v1"
env_key = "INFERENCE_HUB_API_KEY"
wire_api = "responses"
2

Export your key so Codex finds it every session

echo 'export INFERENCE_HUB_API_KEY="sk-prov-live-YOUR_KEY"' >> ~/.zshrc
source ~/.zshrc

Using bash or fish? Replace ~/.zshrc with ~/.bashrc or ~/.config/fish/config.fish.

3

Run Codex

codex

Troubleshooting

If you see…Fix
Every turn is rejected with a 400wire_api must be "responses" in the [model_providers.inference-hub] block — Codex can't use the Chat Completions wire.
401 / "env var not set"Codex reads the key from INFERENCE_HUB_API_KEY. Confirm it's exported in the shell you launch Codex from (echo $INFERENCE_HUB_API_KEY), and source your profile after adding it.
Base URL ignored / 404base_url must be https://app.inferencehub.tech/v1 (ends in /v1), not the bare origin.
"model not found"That id isn't enabled on your plan — list the live ids with the discover-models command on the Models page.