Skip to content

Codex

Codex connects via a custom model provider in ~/.codex/config.toml. Claudin.io exposes the responses wire API that Codex expects.

Use the Codex CLI

These settings apply to the Codex CLI. The hosted Codex app may not let you point at a custom base URL.

Manual setup

Add this to ~/.codex/config.toml:

model = "claudinio"
model_provider = "claudinio"

[model_providers.claudinio]
name = "Claudinio"
base_url = "https://api.claudin.io/v1"
env_key = "CLAUDINIO_API_KEY"
wire_api = "responses"

Then export your key (the name must match env_key above). The easiest way is to set it once in your shell profile:

export CLAUDINIO_API_KEY="sk-..."

Quick setup (script)

codex_config_install() {
  local key="$1"
  local dir="$HOME/.codex"
  local file="$dir/config.toml"

  mkdir -p "$dir"

  if [ -f "$file" ]; then
    cp "$file" "$file.claudinio.bak"
    echo "[ok] Backup: $file.claudinio.bak"
  fi

  cat > "$file" <<TOMLEOF
model = "claudinio"
model_provider = "claudinio"

[model_providers.claudinio]
name = "Claudinio"
base_url = "https://api.claudin.io/v1"
env_key = "CLAUDINIO_API_KEY"
wire_api = "responses"
TOMLEOF

  echo "[ok] Configured: $file"
  echo "[ok] Make sure CLAUDINIO_API_KEY is exported in your shell"
}

codex_config_install
unset codex_config_install
Setting Value
Base URL https://api.claudin.io/v1
Model claudinio
Wire API responses
Key env var CLAUDINIO_API_KEY