CLI Setup Guide
One-click setup for Claude Code and Codex CLI, plus manual configuration for OpenClaw and Hermes Agent.
One-click setup (recommended)
One command installs the CLI, writes the gateway config, and verifies your key with a 1-token test request. Existing config files are backed up automatically.
The key is only inserted into the command locally in your browser; it is never uploaded.
curl -fsSL https://router.one/install/claude-code.sh | bash -s -- sk-your-api-keyConfig takes effect immediately — run claude to start.
$env:ROUTER_ONE_API_KEY = "sk-your-api-key"; irm https://router.one/install/claude-code.ps1 | iexConfig takes effect immediately — run claude to start.
Review the script before running: /install/claude-code.sh · /install/claude-code.ps1
curl -fsSL https://router.one/install/codex.sh | bash -s -- sk-your-api-keyNew terminals work right away; in the current one, run source ~/.zshrc (or your shell profile) first, then codex.
$env:ROUTER_ONE_API_KEY = "sk-your-api-key"; irm https://router.one/install/codex.ps1 | iexThe current session is ready — run codex to start.
Review the script before running: /install/codex.sh · /install/codex.ps1
Manual setup
Prefer to see every step, or need to customize? Configure each tool manually below.
Claude Code CLI Setup Guide
Configure Claude Code CLI to use Router One as a proxy for unified routing, cost controls, and full observability.
sk-xxx).Install Node.js via Homebrew
Claude Code CLI requires Node.js 18 or later.
brew install nodenode --versionInstall Claude Code CLI globally
npm install -g @anthropic-ai/claude-codeConfigure environment variables
Point Claude Code at Router One as its API endpoint.
rm -rf ~/.claudeTemporary (current terminal session only):
export ANTHROPIC_BASE_URL=https://api.router.one
export ANTHROPIC_AUTH_TOKEN=sk-your-api-keyPermanent (write to shell config):
echo 'export ANTHROPIC_BASE_URL=https://api.router.one' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN=sk-your-api-key' >> ~/.zshrc
source ~/.zshrcLaunch Claude Code
Run this to start the CLI:
claudeInstall Node.js
Download from the Node.js website or use winget.
winget install OpenJS.NodeJS.LTSnode --versionInstall Claude Code CLI globally
npm install -g @anthropic-ai/claude-codeConfigure environment variables
Point Claude Code at Router One as its API endpoint.
Remove-Item -Recurse -Force ~\.claudeTemporary (current PowerShell session only):
$env:ANTHROPIC_BASE_URL = "https://api.router.one"
$env:ANTHROPIC_AUTH_TOKEN = "sk-your-api-key"Permanent (system environment variables):
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.router.one", "User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-your-api-key", "User")Launch Claude Code
Run this to start the CLI:
claudeInstall Node.js
Install Node.js 18+ via a package manager or nvm.
Via nvm (recommended):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install --lts
node --versionOr via apt (Debian/Ubuntu):
sudo apt update && sudo apt install -y nodejs npmInstall Claude Code CLI globally
npm install -g @anthropic-ai/claude-codeConfigure environment variables
Point Claude Code at Router One as its API endpoint.
rm -rf ~/.claudeTemporary (current terminal session only):
export ANTHROPIC_BASE_URL=https://api.router.one
export ANTHROPIC_AUTH_TOKEN=sk-your-api-keyPermanent (write to shell config):
echo 'export ANTHROPIC_BASE_URL=https://api.router.one' >> ~/.bashrc
echo 'export ANTHROPIC_AUTH_TOKEN=sk-your-api-key' >> ~/.bashrc
source ~/.bashrcLaunch Claude Code
Run this to start the CLI:
claudeCodex CLI Setup Guide
Configure OpenAI Codex CLI to use Router One as a proxy for unified routing, cost controls, and full observability.
sk-xxx).Install Node.js via Homebrew
Codex CLI requires Node.js 16 or later.
brew install nodenode --versionInstall Codex CLI globally
npm install -g @openai/codexConfigure environment variables
Point Codex at Router One as its API endpoint.
Temporary (current terminal session only):
export ROUTER_ONE_API_KEY=sk-your-api-keyPermanent (write to shell config):
echo 'export ROUTER_ONE_API_KEY=sk-your-api-key' >> ~/.zshrc
source ~/.zshrcCreate the Codex config file
Write the following to ~/.codex/config.toml to register Router One as a model provider.
mkdir -p ~/.codex && cat > ~/.codex/config.toml <<'EOF'
model = "gpt-5.6-sol"
model_provider = "router"
model_reasoning_effort = "high"
model_verbosity = "high"
web_search = "live"
[model_providers.router]
base_url = "https://api.router.one/v1"
env_key = "ROUTER_ONE_API_KEY"
env_key_instructions = "Create an API key at https://router.one/dashboard/api-keys and set the ROUTER_ONE_API_KEY environment variable."
name = "Router One"
wire_api = "responses"
EOFLaunch Codex
Run this to start the CLI:
codexInstall Node.js
Download from the Node.js website or use winget.
winget install OpenJS.NodeJS.LTSnode --versionInstall Codex CLI globally
npm install -g @openai/codexConfigure environment variables
Point Codex at Router One as its API endpoint.
Temporary (current PowerShell session only):
$env:ROUTER_ONE_API_KEY = "sk-your-api-key"Permanent (system environment variables):
[System.Environment]::SetEnvironmentVariable("ROUTER_ONE_API_KEY", "sk-your-api-key", "User")Create the Codex config file
Write the following to %USERPROFILE%\.codex\config.toml to register Router One as a model provider.
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex" | Out-Null
$config = @'
model = "gpt-5.6-sol"
model_provider = "router"
model_reasoning_effort = "high"
model_verbosity = "high"
web_search = "live"
[model_providers.router]
base_url = "https://api.router.one/v1"
env_key = "ROUTER_ONE_API_KEY"
env_key_instructions = "Create an API key at https://router.one/dashboard/api-keys and set the ROUTER_ONE_API_KEY environment variable."
name = "Router One"
wire_api = "responses"
'@
[System.IO.File]::WriteAllText("$env:USERPROFILE\.codex\config.toml", $config, (New-Object System.Text.UTF8Encoding($false)))Launch Codex
Run this to start the CLI:
codexInstall Node.js
Install Node.js 16+ via a package manager or nvm.
Via nvm (recommended):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install --lts
node --versionOr via apt (Debian/Ubuntu):
sudo apt update && sudo apt install -y nodejs npmInstall Codex CLI globally
npm install -g @openai/codexConfigure environment variables
Point Codex at Router One as its API endpoint.
Temporary (current terminal session only):
export ROUTER_ONE_API_KEY=sk-your-api-keyPermanent (write to shell config):
echo 'export ROUTER_ONE_API_KEY=sk-your-api-key' >> ~/.bashrc
source ~/.bashrcCreate the Codex config file
Write the following to ~/.codex/config.toml to register Router One as a model provider.
mkdir -p ~/.codex && cat > ~/.codex/config.toml <<'EOF'
model = "gpt-5.6-sol"
model_provider = "router"
model_reasoning_effort = "high"
model_verbosity = "high"
web_search = "live"
[model_providers.router]
base_url = "https://api.router.one/v1"
env_key = "ROUTER_ONE_API_KEY"
env_key_instructions = "Create an API key at https://router.one/dashboard/api-keys and set the ROUTER_ONE_API_KEY environment variable."
name = "Router One"
wire_api = "responses"
EOFLaunch Codex
Run this to start the CLI:
codexOpenClaw CLI Setup Guide
Configure OpenClaw to use Router One as a custom OpenAI-compatible provider for agent model calls.
sk-xxx).Install Node.js via Homebrew
OpenClaw CLI requires Node.js 22.14.0 or later.
brew install nodenode --versionInstall OpenClaw CLI globally
npm install -g openclaw@latestConfigure environment variables
Point OpenClaw at Router One as its API endpoint.
Temporary (current terminal session only):
export CUSTOM_API_KEY=sk-your-api-keyPermanent (write to shell config):
echo 'export CUSTOM_API_KEY=sk-your-api-key' >> ~/.zshrc
source ~/.zshrcRun OpenClaw onboarding
Register Router One as a custom OpenAI-compatible provider and install the local daemon.
openclaw onboard --non-interactive \
--auth-choice custom-api-key \
--custom-base-url https://api.router.one/v1 \
--custom-model-id gpt-5.6-sol \
--custom-provider-id router-one \
--custom-compatibility openai \
--install-daemonLaunch OpenClaw
Run this to start the CLI:
openclawInstall Node.js
Download from the Node.js website or use winget.
winget install OpenJS.NodeJS.LTSnode --versionInstall OpenClaw CLI globally
npm install -g openclaw@latestConfigure environment variables
Point OpenClaw at Router One as its API endpoint.
Temporary (current PowerShell session only):
$env:CUSTOM_API_KEY = "sk-your-api-key"Permanent (system environment variables):
[System.Environment]::SetEnvironmentVariable("CUSTOM_API_KEY", "sk-your-api-key", "User")Run OpenClaw onboarding
Register Router One as a custom OpenAI-compatible provider and install the local daemon.
openclaw onboard --non-interactive `
--auth-choice custom-api-key `
--custom-base-url https://api.router.one/v1 `
--custom-model-id gpt-5.6-sol `
--custom-provider-id router-one `
--custom-compatibility openai `
--install-daemonLaunch OpenClaw
Run this to start the CLI:
openclawInstall Node.js
Install Node.js 22.14.0+ via a package manager or nvm.
Via nvm (recommended):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 24
node --versionOr via apt (Debian/Ubuntu):
sudo apt update && sudo apt install -y nodejs npmInstall OpenClaw CLI globally
npm install -g openclaw@latestConfigure environment variables
Point OpenClaw at Router One as its API endpoint.
Temporary (current terminal session only):
export CUSTOM_API_KEY=sk-your-api-keyPermanent (write to shell config):
echo 'export CUSTOM_API_KEY=sk-your-api-key' >> ~/.bashrc
source ~/.bashrcRun OpenClaw onboarding
Register Router One as a custom OpenAI-compatible provider and install the local daemon.
openclaw onboard --non-interactive \
--auth-choice custom-api-key \
--custom-base-url https://api.router.one/v1 \
--custom-model-id gpt-5.6-sol \
--custom-provider-id router-one \
--custom-compatibility openai \
--install-daemonLaunch OpenClaw
Run this to start the CLI:
openclawHermes Agent Setup Guide
Configure Hermes Agent to use Router One as a custom OpenAI-compatible endpoint with persistent model settings.
sk-xxx).Install Python and pip
Hermes Agent installs with pip. Windows users should run Hermes inside WSL2.
brew install python
python3 --version
python3 -m pip --versionnode --versionInstall Hermes Agent CLI globally
pip install hermes-agent
hermes postinstallCreate the Hermes config file
Write the following to ~/.hermes/config.yaml to persist Router One as the custom endpoint.
mkdir -p ~/.hermes && cat > ~/.hermes/config.yaml <<'EOF'
model:
provider: custom
default: gpt-5.6-sol
base_url: https://api.router.one/v1
api_key: sk-your-api-key
context_length: 65536
EOFLaunch Hermes Agent
Run this to start the CLI:
hermesInstall WSL2
Install WSL2 first, then run the remaining Hermes commands inside your WSL2 terminal.
wsl --installnode --versionInstall Hermes Agent CLI globally
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
source ~/.bashrcCreate the Hermes config file
Write the following to ~/.hermes/config.yaml to persist Router One as the custom endpoint.
mkdir -p ~/.hermes && cat > ~/.hermes/config.yaml <<'EOF'
model:
provider: custom
default: gpt-5.6-sol
base_url: https://api.router.one/v1
api_key: sk-your-api-key
context_length: 65536
EOFLaunch Hermes Agent
Run this to start the CLI:
hermesInstall Python and pip
Hermes Agent installs with pip. Windows users should run Hermes inside WSL2.
python3 --version
python3 -m pip --versionOr via apt (Debian/Ubuntu):
sudo apt update && sudo apt install -y python3 python3-pipInstall Hermes Agent CLI globally
pip install hermes-agent
hermes postinstallCreate the Hermes config file
Write the following to ~/.hermes/config.yaml to persist Router One as the custom endpoint.
mkdir -p ~/.hermes && cat > ~/.hermes/config.yaml <<'EOF'
model:
provider: custom
default: gpt-5.6-sol
base_url: https://api.router.one/v1
api_key: sk-your-api-key
context_length: 65536
EOFLaunch Hermes Agent
Run this to start the CLI:
hermes