Skip to content

Configure CLI Tools

Once you have an API key, point your tool's base URL at RouterBus and give it the key.

If you prefer a GUI, CC-Switch can import a key in one click from the API Keys page.

API addresses

EndpointAddress
OpenAI-compatiblehttps://www.routerbus.com/v1
Claude nativehttps://www.routerbus.com
Gemini nativehttps://www.routerbus.com/v1beta

Which address you use depends on the protocol your client speaks, not on the model you pick. Copy model IDs from Model Square.

Quick setup

Claude Code

bash
export ANTHROPIC_BASE_URL=https://www.routerbus.com
export ANTHROPIC_AUTH_TOKEN=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

See Claude Code Setup.

Codex CLI

bash
export OPENAI_BASE_URL=https://www.routerbus.com/v1
export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

See Codex CLI Setup.

Gemini CLI

bash
export GOOGLE_GEMINI_BASE_URL=https://www.routerbus.com/v1beta
export GEMINI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

See Gemini CLI Setup.

Do not skip the base URL

Setting only the API key leaves the request going to the provider's own address, and a RouterBus key against the provider's API is just a 401.

Other clients

Anything that accepts a custom OpenAI base URL works: use https://www.routerbus.com/v1 and your key. Copy Connection Info on the API Keys page copies both at once.

RouterBus API Documentation