Add a local provider
Start the gateway. Merge this example into ~/.codex/config.toml and replace your-route with your Tokening route name. Put the first two settings at the top level of the file.
model_provider = "tokening"
model = "your-route"
[model_providers.tokening]
name = "Tokening"
base_url = "http://127.0.0.1:18800/v1"
wire_api = "responses"
env_key = "TOKENING_API_KEY"Start Codex
In the same terminal, run export TOKENING_API_KEY=tk-your-local-key with your local key, then run codex. On macOS you can also configure Codex from the app’s integrations section.