Codex → AI24X
Codex is OpenAI's open-source terminal/desktop coding agent. Point it at AI24X to use the Responses API with DeepSeek V4 and 20+ VIP named models: one key, PayPal USD billing, global signup.
1) Prerequisites
Sign up → Console → create an API key → keep a small credit balance. Codex CLI ≥ 0.146 (Responses wire API) or desktop. Paste the key in full—never truncate with "…". VIP named models need an active membership.
2) Provider config (~/.codex/config.toml)
CLI and desktop share ~/.codex/config.toml. Add the ai24x provider: base_url must end at https://api.ai24x.com/v1, and wire_api must be "responses" (Codex 0.146 deprecated chat):
Restart the desktop app after saving; open a new terminal for CLI. Start with flash or vip-ds-flash—see the model table in section 5.
3) Set the API key (env var)
Keep the key in an environment variable only—never paste it into a Codex chat (it triggers a secret-leak warning and can stall the session):
setx does not affect already-open windows—open a new terminal, or set $env:AI24X_API_KEY="…" temporarily to verify in the current window.
4) Smoke test
Non-interactive check (expect OK, no errors):
Or verify /v1/responses outside the IDE with curl (live since 2026-08-05, text chat returns 200):
Expect HTTP 200, object: "response", and text in output[0].content.
5) DeepSeek & VIP named models
Switch models by changing model = to an id below. VIP ids (vip-*) need an active membership and spend prepaid credits; higher multipliers drain balance faster. Prices are point-in-time estimates—billing follows the Console.
| Model | ID | Mult | Est USD/1M | Notes |
|---|---|---|---|---|
| AI24X Flash | flash | 1 | ~$0.35 | Daily default |
| AI24X Pro | pro | 3 | ~$1.05 | Stronger reasoning |
| VIP DeepSeek V4.1 Flash | vip-ds-flash | 1 | ~$0.35 | Cheapest VIP—recommended start |
| VIP DeepSeek V4 Pro | vip-ds-pro | 3 | ~$1.05 | Stronger reasoning · Flash price from Sep 14 |
| VIP Kimi K2.7 Code | vip-kimi-code | 10 | ~$3.50 | Coding |
| VIP Kimi K3 | vip-kimi | 39 | ~$13.65 | Flagship |
| VIP Claude Sonnet 5 | vip-claude-sonnet | 26 | ~$9.10 | Writing / reasoning |
| VIP GPT-5 | vip-gpt5 | 25 | ~$8.75 | Flagship |
Full catalog of 20+ named models (Kimi / Qwen / GLM / MiniMax / GPT-5 / Claude / Gemini …): VIP list.
5.1) Full VIP alias catalog (24)
All 24 vip-* aliases (live on the gateway since 2026-08-11). Use them with -c "model=vip-xxx" (section 6). New additions: GPT-5 / GPT-5.4 / GPT-5 mini.
| Line | Alias | Model |
|---|---|---|
| China | vip-ds-flash | DeepSeek V4.1 Flash |
vip-ds-pro | DeepSeek V4 Pro | |
vip-kimi | Kimi K3 | |
vip-kimi-code | Kimi K2.7 Code | |
vip-qwen-max | Qwen Max | |
vip-qwen122b | Qwen 122B | |
vip-glm | GLM | |
vip-minimax | MiniMax | |
vip-mimo | MiMo | |
vip-hy3 | Hunyuan 3 | |
vip-llama4 | Llama 4 | |
| International | vip-gpt6-astra | GPT-6 Astra |
vip-gpt5 | GPT-5 | |
vip-gpt54 | GPT-5.4 | |
vip-gpt5-mini | GPT-5 mini | |
vip-gpt4o | GPT-4o | |
vip-gpt4o-mini | GPT-4o mini | |
vip-gpt56-luna | GPT-5.6 Luna | |
vip-gpt56-terra | GPT-5.6 Terra | |
vip-gpt56-sol | GPT-5.6 Sol | |
vip-claude-opus | Claude Opus | |
vip-claude-sonnet | Claude Sonnet | |
vip-claude-haiku | Claude Haiku | |
vip-gemini-pro | Gemini Pro | |
vip-gemini-flash | Gemini Flash | |
vip-grok | Grok |
6) Pick a model & switch in-session (/model)
CLI (recommended): pass the provider and model on every run so the alias always routes to AI24X:
Inside an interactive session, type /model and pick any alias from the catalog above — switch anytime without starting a new session or losing context.
Pitfalls
-m "provider/model"combined form errors out — e.g.-m "ai24x/vip-gpt5"is invalid. Do not join provider and model with a slash.-m "vip-xxx"alone may route to the wrong provider — always pair-c "model_provider=…"with-c "model=…".- Desktop model picker does not list AI24X models — upstream gating, not planned. Use
/modelor CLI flags; do not expect the picker to show them. - Replace
ai24x-prodwith the provider name defined in your~/.codex/config.toml(the snippet in section 2 names itai24x).
7) Status & pitfalls
- Responses is live; agent tool loops are being completed — AI24X
/v1/responseshandles text chat (verified 200); full agent tool calling runs on/v1/chat/completions(OpenAI tools supported). Codex currently talks Responses: text and planning work; auto-editing tool loops unlock once the platform completes Responses tool support. - base_url missing /v1 — requests hit wrong paths like
/chat/completions. Usehttps://api.ai24x.com/v1. - 401 — bad, truncated, or revoked key. Paste the full key from Console; create a new one if unsure.
- 402 — insufficient balance / prepaid needed for the model. Top up in Console.
- 403 named model needs active membership —
vip-*requires membership + prepaid. - "Model metadata not found" warning is harmless — custom providers fall back to default metadata; it does not affect usage.
- Don't combine
-m "provider/model"— errors out; use-c "model_provider=…"+-c "model=…"(section 6). - Desktop picker won't show AI24X models — upstream gating; switch with
/modelor CLI flags.
Create account All integrations OpenClaw guide VIP model list Console