Gemini CLI Setup
Gemini CLI is Google's command-line AI tool. RouterBus relays the native Gemini format, so pointing the base URL here is all it takes.
Prerequisites
- Gemini CLI installed
- An API key created on RouterBus
Configuration
Environment variables
export GOOGLE_GEMINI_BASE_URL=https://www.routerbus.com/v1beta
export GEMINI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAdd them to ~/.bashrc or ~/.zshrc, then reload:
source ~/.bashrcThe base URL is not optional
With only GEMINI_API_KEY set, Gemini CLI sends requests to Google's own endpoint — which does not know your RouterBus key and will reject it.
Verify
gemini "hello"Examples
# One-off question
gemini "write an HTTP server in Go"
# Interactive mode
geminiModels
Available Gemini model IDs are whatever Model Square lists — copy them from there.
Each model's detail page says which endpoints it accepts. If a model is only open on the OpenAI-compatible endpoint, call it from any client that takes a custom OpenAI base URL, using https://www.routerbus.com/v1.
Note
Gemini CLI's environment variables change between versions. If the names above do not work in yours, check that version's documentation for its base URL setting and point it at https://www.routerbus.com/v1beta.