Codex setup
One settings file works for the Codex CLI, the Codex app and the VS Code extension.
Setup
- Install the CLI:
npm install -g @openai/codex. The app and the extension do not need the CLI, only the file from step 2. - Open
~/.codex/config.toml(on Windows%USERPROFILE%\.codex\config.toml) and add:
model = "gpt-6-sol"
model_reasoning_effort = "high"
model_provider = "claudexia"
[model_providers.claudexia]
name = "Claudexia"
base_url = "https://api.claudexia.tech/v1"
wire_api = "responses"
requires_openai_auth = true- Put your key in
~/.codex/auth.json:
{ "OPENAI_API_KEY": "sk_cdx_YOUR_KEY" }- Run
codex. To pick a model quickly usecodex --profile astraorcodex --model gpt-6.1-sol.
In Codex 0.134.0 and later a profile is a separate file such as ~/.codex/astra.config.toml, with the same top-level keys. Codex reads config.toml and layers the profile on top, so --profile astra takes its settings from ~/.codex/astra.config.toml. Newer versions do not read [profiles.*] tables from config.toml, and the old profile = "..." selector is no longer supported: remove them if they are still there. Before 0.134.0 profiles were tables inside config.toml. The claudexia provider stays in config.toml.
model = "gpt-6-astra"model = "gpt-6-luna"Important: The base_url includes /v1, and wire_api = "responses" turns on the Responses API format.
model_reasoning_effort sets how deeply the model reasons. To save money use "medium" or remove the line. The app and the extension read the file on launch: restart them fully after editing.
Settings reference
| Setting | Description | Example |
|---|---|---|
model_provider | Provider that serves the requests. Must match the table name in model_providers. | "claudexia" |
model | Default model ID. | "gpt-6-sol" |
model_reasoning_effort | Reasoning depth. | "medium", "high" |
base_url | Claudexia API address with /v1. | https://api.claudexia.tech/v1 |
wire_api | Request format: Responses API. | "responses" |
requires_openai_auth | Take the key from ~/.codex/auth.json. | true |
Key in an environment variable
If you would rather not store the key in a file, replace requires_openai_auth with env_key and set the CODEX_KEY variable:
[model_providers.claudexia]
name = "Claudexia"
base_url = "https://api.claudexia.tech/v1"
wire_api = "responses"
env_key = "CODEX_KEY"export CODEX_KEY="sk_cdx_YOUR_KEY"When something goes wrong
Authentication errors
Check the OPENAI_API_KEY field in auth.json: the key must start with sk_cdx_ and be active in the API Keys section. Restart Codex after editing.
Model not found
Codex sends the model value to Claudexia as is, so it must match an ID from the catalog, for example gpt-6-sol.
404 or unexpected response
Check that base_url ends with /v1 and wire_api is "responses".