Codex CLI setup
Codex CLI supports custom OpenAI-compatible providers. SP Cambo is configured as one, with the key read from an environment variable.
Before you start
- Codex CLI installed.
- An active package, an API key, and a model alias from the catalogue.
- A model whose capabilities include the Responses API — check the catalogue before configuring.
Add the provider
Add an spcambo provider and a matching profile to your Codex configuration. The base URL must end in /v1 for OpenAI-compatible clients — the opposite of the Claude Code rule.
[model_providers.spcambo]
name = "SP Cambo"
base_url = "https://sp-cambo.store/v1"
env_key = "SPCAMBO_API_KEY"
wire_api = "responses"
[profiles.spcambo]
model = "<your-model-alias>"
model_provider = "spcambo"env_key tells Codex which environment variable holds the credential, so your key never appears in the config file itself. Keep it that way: config files get committed by accident far more often than environment variables do.
Run it
export SPCAMBO_API_KEY="sk-your-key"
codex --profile spcambo If you would rather not pass --profile every time, make the profile your default in the Codex configuration.
Why the Responses wire API
SP Cambo exposes the OpenAI-compatible surface as the Responses API. Configuring a Chat Completions wire format against https://sp-cambo.store/v1 will send requests to a path that does not exist here, and every call will fail. Set wire_api = "responses".
Troubleshooting
Provider not found
The profile's model_provider must match the provider table key exactly — spcambo in both places.
Missing credential
Codex reads the variable named by env_key. If it is unset in the shell that launches Codex, you get an authentication error rather than a configuration error.
404 on every call
Either the base URL is missing its /v1, or the wire API is set to Chat Completions. Check both.
Model rejected
The alias may not exist, may not support the Responses API, or may be outside your key's scope. All three are visible in the dashboard and the catalogue.
Keeping keys out of your config
Do not inline a key into config.toml, even temporarily. If you already have, rotate the key from the dashboard — the old secret is invalidated immediately — and remove the value from any backup or repository that captured the file.