Gemini CLI
Gemini CLI is Google’s official command-line interface for interacting with Gemini models. This guide shows you how to configure it to use KiosAPI.Prerequisites
- Node.js 20+ — check with
node --version - A KiosAPI API key (starts with
sk-) created in theGeminigroup
Get the right API key
Gemini models on KiosAPI are served through theGemini group (0.05× multiplier):
- Log in to the KiosAPI Dashboard.
- Go to Console → Tokens → Add Token.
- Select the group
Gemini. - Save and copy the key.
Installation
Install Gemini CLI globally via npm:Current Gemini models on KiosAPI
The authoritative list is the Models & Pricing page (filter by the
Gemini group).
Configuration
1. Set the base URL
Create~/.gemini/.env:
The base URL must end with a trailing slash
/. Gemini CLI appends the API path after it.2. Configure settings
Create~/.gemini/settings.json:
3. Start Gemini CLI
GOOGLE_API_KEY in ~/.gemini/.env.
Usage
Interactive mode
Direct question
Switching models
Inside the interactive session:Troubleshooting
401 Unauthorized / Invalid API key
- Ensure
GOOGLE_API_KEYcontains your KiosAPI key (sk-...), not a Google AI key - Ensure
auth.selectedTypeisapi-keyin~/.gemini/settings.json - If the CLI still tries Google Login, remove cached auth: delete
~/.gemini/oauth_creds.jsonand restart
Model Not Found / No Available Channel
- Verify your token is in the
Geminigroup - Verify the model name is current (old names like
gemini-2.5-prono longer exist) — check the pricing page
Connection Error
- Ensure
GOOGLE_GEMINI_BASE_URLishttps://kiosapi.com/with the trailing slash - Check your network connection
