Prerequisites
- Gemini CLI installed, with Node.js 20+ recommended
- An AIOHub
sk-API key - A group assigned to the API key that can access Gemini models
- A positive account balance
Setup
Set the variables in the shell where you start Gemini CLI:Persist in your shell profile
- macOS / Linux (zsh)
- Windows PowerShell
Gemini CLI appends the API version path itself. Do not set
GOOGLE_GEMINI_BASE_URL to a URL that already includes /v1beta.Verify
Troubleshooting
Gemini CLI stalls or stops responding
Gemini CLI stalls or stops responding
Restart the session and confirm that the group assigned to the API key can access Gemini models.
The request returns 400
The request returns 400
Clear or restart the session, then confirm that the model exists in the
/v1beta/models response.Project config overrides environment variables
Project config overrides environment variables
Check whether the current directory contains a
.env file or Gemini CLI config that overrides the API key, model, or Base URL. Remove the conflicting setting, then reopen the terminal.