Codex CLI
OpenAI Codex with a custom model provider
Codex talks the OpenAI Responses API (/v1/responses). Point
it at orientx with a custom provider in ~/.codex/config.toml — do not reuse the reserved ids
openai, ollama, or lmstudio.
| Base URL | https://api.orientx.ai/v1 |
| Auth | ORIENTX_API_KEY (via env_key) |
| Config | ~/.codex/config.toml |
Export the key
export ORIENTX_API_KEY="sk-..."Add a provider
Put this in your user-level ~/.codex/config.toml (project-local files cannot override provider
settings):
model = "<MODEL_ID>"
model_provider = "orientx"
[model_providers.orientx]
name = "orientx"
base_url = "https://api.orientx.ai/v1"
env_key = "ORIENTX_API_KEY"Replace <MODEL_ID> with an id from GET /v1/models. Codex defaults to the Responses wire format;
leave wire_api unset.
The model you pick must accept /v1/responses. If Codex errors on an unknown path or an
unsupported field, choose another id from GET /v1/models — Chat Completions-only models will not
drive the agent.