Gemini CLI
MarkdownTerminal agent · Gemini
Full guide
| Format | Where to set it up |
|---|---|
| Gemini | GEMINI_API_KEY and GOOGLE_GEMINI_BASE_URL environment variables; authentication method: ~/.gemini/settings.json → security.auth.selectedType = "gemini-api-key"; model: GEMINI_MODEL or the -m flag |
Setup
Copy the configuration and replace sk-... with your key from the Ailoot Dashboard. Prefer storing the key in the environment variable AILOOT_API_KEY, if the application supports it.
Before starting, request GET /v1/models with your Ailoot key. Choose an exact model ID whose methods include POST /v1beta/models/{model}:generateContent, then use that ID in the configuration. For agents, also check tool support and the features required by your client version.
export AILOOT_API_KEY="sk-..."
export GEMINI_API_KEY="$AILOOT_API_KEY"
export GOOGLE_GEMINI_BASE_URL=https://api.ailoot.ai
export GEMINI_MODEL=gemini-3.8-flash
gemini~/.gemini/settings.json
{
"security": {
"auth": {
"selectedType": "gemini-api-key"
}
}
}Example model: gemini-3.8-flash. Choose any other model from the catalog — check that it supports the format you need.
Good to know
Test
- For the Gemini format, the URL is
https://api.ailoot.aiwithout/v1beta. - Ask a short question. If you get an error, check the code and Request ID, then consult Errors and limits.
404:https://api.ailoot.ai→/v1beta/models/{model}:generateContent. Before starting, request GET /v1/models with your Ailoot key. Choose an exact model ID whose methods include POST /v1beta/models/{model}:generateContent, then use that ID in the configuration. For agents, also check tool support and the features required by your client version.- 402 — insufficient balance for the reserve. Agents reserve more than chat: why.
Application documentation: https://geminicli.com/docs/reference/configuration/
Still have questions? Send your Request ID and a description — we'll help you troubleshoot.Contact support