Codex CLI
Connect OpenAI Codex CLI to Mixen — pay from your balance in roubles, with tool calling and streaming over our OpenAI-compatible /v1/responses.
Installation
Section titled “Installation”npm i -g @openai/codexNode.js 22+ is required.
Configuration
Section titled “Configuration”Create ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml):
model_provider = "mixen"model = "openai/gpt-5.5"model_reasoning_effort = "high"
[model_providers.mixen]name = "Mixen AI"base_url = "https://api.mixen.ai/v1/"env_key = "MIXEN_API_KEY"wire_api = "responses"Key points:
model_providermust match the[model_providers.<id>]section name.base_urlmust end with/v1/.wire_api = "responses"— Mixen supports the Responses API (stateless: Codex sends the full history in input — previous_response_id/store are not needed).
The API key environment variable:
export MIXEN_API_KEY="your-api-key" # add to ~/.bashrc or ~/.zshrc to persistRunning
Section titled “Running”codex "your prompt"Recommended models
Section titled “Recommended models”| Model | ID |
|---|---|
| GPT-5.6 Sol | openai/gpt-5.6-sol |
| Claude Opus 5 | anthropic/claude-opus-5 |
| GLM 5.3 | z-ai/glm-5.3 |
| DeepSeek V4 Pro | deepseek/deepseek-v4-pro |
| Kimi K3 | moonshotai/kimi-k3 |
Full list — in the catalog.
Troubleshooting
Section titled “Troubleshooting”- “Model provider not found” — the
model_providername doesn’t match the[model_providers.<id>]section; they must be identical. - “stream disconnected before completion” — check
wire_api = "responses"and the/v1/suffix inbase_url. - Key not found — the variable from
env_keymust be set in the current terminal session. - Model doesn’t call tools — file and command support depends on tool calling in the specific model; try another one from the catalog.