Skip to content

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

  • 401 or invalid_key: check NEXUS_API_KEY; do not store it in config.toml.
  • model_not_found or model_not_allowed: request GET /v1/models again.
  • Protocol errors: do not change responses to 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.