Codex CLI
Add the apixly gateway as a custom model provider in Codex's config.toml, using the OpenAI-compatible chat wire API.
config.toml
toml
# ~/.codex/config.toml
model = "gpt-5.5"
model_provider = "gateway"
[model_providers.gateway]
name = "gateway"
base_url = "https://apixly.ai/v1"
env_key = "GATEWAY_API_KEY"
wire_api = "chat"Run
Export the key under the env_key name you configured, then start Codex:
bash
export GATEWAY_API_KEY="YOUR_API_KEY"
codexUse wire_api = "chat" — the gateway speaks OpenAI chat/completions. The key must be bound to an OpenAI group. Config keys can move between Codex versions; check codex --help if a field is rejected.