Skip to main content
Codex CLI (@openai/codex) is OpenAI’s terminal coding agent. Recent versions speak the OpenAI Responses API.
Protocol: OpenAI Responses API
  • Base URL: https://api.orcarouter.ai/v1 (includes /v1)
  • wire_api: must be "responses" — current Codex builds removed the older "chat" value
  • OrcaRouter implements /v1/responses, so it works out of the box

Install

npm install -g @openai/codex

Configure

Edit ~/.codex/config.toml:
model = "orcarouter/auto"
model_provider = "orcarouter"

[model_providers.orcarouter]
name = "OrcaRouter"
base_url = "https://api.orcarouter.ai/v1"
wire_api = "responses"
env_key = "ORCA_KEY"
Then export the key the config refers to:
export ORCA_KEY="sk-orca-..."

Run

codex exec --skip-git-repo-check "Reply with exactly: OK"

Notes

  • Model names use the vendor/model format; orcarouter/auto is simplest.
  • On Windows, Codex runs under WSL2.
VS Code extension: OpenAI’s official Codex extension runs the CLI inside the editor and shares the same ~/.codex/config.toml — no separate in-editor endpoint setting. (Codex inside GitHub Copilot is a different product that uses Copilot’s own account and can’t BYOK to OrcaRouter.)

Enable thinking / reasoning

Set model_reasoning_effort in config.toml (minimal / low / medium / high / xhigh; default medium), or pick it from the /model menu in an interactive session.