メインコンテンツへスキップ
更新日: 2026-06-06

Overview

Gemini CLI is Google’s command-line AI assistant. By configuring Crazyrouter’s Gemini-native endpoint, you can use Gemini models that have been verified with real requests in Crazyrouter production.

Configuration

Environment Variables

In the current Gemini CLI release, API-key mode still requires GEMINI_API_KEY to be present explicitly. For Crazyrouter’s Gemini-native endpoint, set these three variables together:
PowerShell:
If you want this to persist across sessions, put the same values into ~/.gemini/.env or your PowerShell profile.

Configuration File

Edit ~/.gemini/settings.json:
Notes:
  • Do not leave the auth mode as oauth-personal, or the CLI will continue trying Google sign-in.
  • Do not write model as a plain string in current versions; use model.name.
  • In some CLI paths, settings.json alone is not enough. Headless mode may still require the GEMINI_API_KEY environment variable.

~/.gemini/.env Example

Launch

Crazyrouter supports both the Gemini native API format and the OpenAI-compatible format. Gemini CLI uses the Gemini-native format. The gemini-3.1-pro example above, the gemini-api-key auth mode, and GOOGLE_GEMINI_BASE_URL=https://api.crazyrouter.com have been validated with a real CLI request.