1. Prepare your API key
Create a CheapLLM key and export it in the same environment that runs Codex. Note that the CheapLLM site is still a demonstration and the API does not accept requests yet; the configuration below is the target setup.
export CHEAPLLM_API_KEY="YOUR_CHEAPLLM_API_KEY"
2. Configure the provider
Open ~/.codex/config.toml and add a separate provider entry. Codex talks to the Responses API, and the config file holds the name of the environment variable instead of the credential.
[model_providers.cheapllm]
name = "CheapLLM"
base_url = "https://api.cheapllm.com/v1"
env_key = "CHEAPLLM_API_KEY"
wire_api = "responses"
3. Select the model
In the same config.toml set the model identifier from your catalog and point Codex at the provider you just created.
model = "MODEL_ID"
model_provider = "cheapllm"
4. Run Codex
Start Codex from the terminal where the key is set and send a test prompt. If an error appears, first check whether the selected model supports the Responses API.
codex
