Codex CLI
CodexMode: OpenAI-compatible

Codex CLI

Codex is OpenAI’s terminal coding agent. It speaks the OpenAI-compatible format, so point it at https://api.nexotao.com/v1 and use Nexotao’s OpenAI-compat models: gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5-mini, grok-4.3, DeepSeek-V4-Pro, or DeepSeek-V4-Flash.

For Claude models, use Claude Code (Anthropic format). Codex has no Anthropic mode.

Install Codex

Follow OpenAI’s official Codex docs. Verify:

codex --version

Set the API key as an environment variable

Codex reads the key from an env var (it is not stored in the config file).

# add to ~/.zshrc or ~/.bashrc
export OPENAI_API_KEY="sk-nexo-..."

Register Nexotao as a provider

Open (or create) ~/.codex/config.toml and add:

# ~/.codex/config.toml
model = "gpt-5.6-sol"         # default model; change as needed
model_provider = "nexotao"
forced_login_method = "api"
 
[model_providers.nexotao]
name = "Nexotao"
base_url = "https://api.nexotao.com/v1"   # MUST include /v1
env_key = "OPENAI_API_KEY"                # env var holding sk-nexo-...
wire_api = "responses"                    # REQUIRED "responses"; Codex removed "chat"

Run

From your project directory:

codex

Switch models anytime via a flag:

codex -m grok-4.3
codex -m DeepSeek-V4-Pro

Important notes

⚠️

Two values in config.toml are the usual culprits: base_url must end in /v1 (Codex appends /responses itself), and wire_api must be "responses". Recent Codex versions removed wire_api = "chat", so older configs will not work.

  • Nexotao exposes the Responses API (/v1/responses) with full streaming — so Codex works out of the box.
  • The provider ID (nexotao) cannot reuse reserved names like openai, ollama, or lmstudio.
  • The key is not stored in config.toml; only the env var name (env_key) is.

Usage is billed from your Rupiah balance per token. See Billing & Pricing.