Setting Up Codex¶
Configuration Example¶
Create a separate ~/.codex/nexus.config.toml profile:
model = "MODEL_FROM_V1_MODELS"
model_provider = "nexus"
[model_providers.nexus]
name = "Nexus"
base_url = "https://api.nexus-hub.ru/v1"
env_key = "NEXUS_API_KEY"
wire_api = "responses"
Set the key:
export NEXUS_API_KEY="your_nexus_key"
Set model only to a value returned by GET /v1/models for your key.
Run codex --profile nexus. Codex sends requests to
POST /v1/responses.
Troubleshooting¶
401orinvalid_key: checkNEXUS_API_KEY; do not store it inconfig.toml.model_not_foundormodel_not_allowed: requestGET /v1/modelsagain.- Protocol errors: do not change
responsesto Chat Completions; that is a different route. - For support, keep the response
x-request-id, but do not send the key or a full prompt.
Official reference: Codex config reference.