Integration · Google

Point Gemini CLI at Crazyrouter

Crazyrouter serves the Gemini-native API, so Gemini CLI works with a base URL override and your Crazyrouter key — no Google Cloud project required.

Manual configuration

Set GEMINI_API_KEY, GEMINI_MODEL and GOOGLE_GEMINI_BASE_URL together; in the current CLI release API-key mode still needs GEMINI_API_KEY even when settings.json is configured.

Environment (all three are required)

bash
export GEMINI_API_KEY=sk-your-crazyrouter-key
export GEMINI_MODEL=gemini-3.1-pro
export GOOGLE_GEMINI_BASE_URL=https://api.crazyrouter.com

Gemini CLI uses the Gemini-native API, so the base URL is the root domain — no /v1, no /v1beta.

Or ~/.gemini/.env

bash
GEMINI_API_KEY=sk-your-crazyrouter-key
GEMINI_MODEL=gemini-3.1-pro
GOOGLE_GEMINI_BASE_URL=https://api.crazyrouter.com
Base URL rule

https://api.crazyrouter.com — This tool speaks a vendor-native protocol and appends its own path. Use the root domain exactly as shown — no /v1.

Recommended models

Live Crazyrouter prices, refreshed hourly. Any model in the catalogue works; these are the ones we'd start with.

FAQ

Which auth mode?

gemini-api-key. Skip the Google login flow entirely.

settings.json alone doesn't work

Known CLI behaviour: headless and some interactive paths still read GEMINI_API_KEY from the environment. Keep the env var set.

Can I use non-Gemini models?

Gemini CLI only speaks the Gemini protocol, so stick to Gemini models here; use Claude Code or Codex for other families.