Codex CLI is OpenAI's open-source AI coding CLI tool, supporting code generation, debugging, shell operations, file management, and more.
npm install -g @openai/codex~/.bashrc or ~/.zshrc and restart your terminal.~/.codex/config.toml:model = "gpt-4o"
model_provider = "ccapi"
[model_providers.ccapi]
name = "CCAPI Gateway"
base_url = "https://api.ccapi.ai/v1"
env_key = "CCAPI_API_KEY"
wire_api = "responses"| Model | Description |
|---|---|
gpt-4o | Multimodal flagship, proven quality |
gpt-4.1 | 1M context window |
gpt-5-mini | GPT-5 family, balanced |
gpt-5-nano | Ultra-low cost |
gpt-4o-mini | Best value |
gpt-5.4 | Latest and strongest |
For the full model list and real-time pricing, visit Model Market.
| Problem | Solution |
|---|---|
| Connection timeout | Confirm OPENAI_BASE_URL is set to https://api.ccapi.ai/v1 (note the /v1) |
| Invalid token | Check token status at Console |
| Insufficient balance | Top up at Console > Top Up |
| Model not found | Check model name spelling. View available models at Model Market |
https://api.ccapi.ai/v1OPENAI_API_KEY or custom env_key~/.codex/config.toml