Tool guides / Gemini CLI

DocsTool guidesGemini CLI

Gemini CLI

Google’s agent for the terminal. Point it at ACCTOKEN with GOOGLE_GEMINI_BASE_URL and pin a model.

Root URLhttps://intl.acctoken.com+ /v1https://intl.acctoken.com/v1Full paththe whole endpoint, e.g. https://intl.acctoken.com/v1/chat/completions

On this page
  1. Connection details
  2. Set it up
  3. Check it works
  4. Common problems

Before you start

  • An ACCTOKEN API key. Create one on API Keys in the console.
  • Gemini CLI installed. Run gemini --version to check.

01Connection details

CONNECTION RECORDGEMINI CLI
Format
Gemini generateContent
Base URL
https://intl.acctoken.comno /v1beta
API key
YOUR_API_KEYas GEMINI_API_KEY
Model
gemini-3.8-flashGemini models only. Pin it; the default picks Google’s own IDs
Set as
GEMINI_API_KEYGOOGLE_GEMINI_BASE_URLGEMINI_MODEL
LIVE CHECKCommands run on the live APIEvery command on this page is run against intl.acctoken.com before it is published.ACCTOKEN DOCS DESK

02Set it up

Pick your shell and replace YOUR_API_KEY with your key.

export GEMINI_API_KEY="YOUR_API_KEY"export GOOGLE_GEMINI_BASE_URL="https://intl.acctoken.com"export GEMINI_MODEL="gemini-3.8-flash"gemini
These last for this terminal. To keep them, use the .env file tab.

03Check it works

Run one prompt without opening the interactive view:

gemini -p "Reply with exactly: OK"
Expected outputOK

Common problems

Gemini CLI is not running in a trusted directory

Without the interactive view, Gemini CLI only runs in folders you trust. Start gemini once in that folder and trust it, or add --skip-trust to the command.

Please set an Auth method in your settings.json or specify … GEMINI_API_KEY

Gemini CLI did not find the key. It reads ~/.gemini/.env only in folders you trust: trust the folder, or set GEMINI_API_KEY in your shell as above.

Gemini CLI asks how you want to sign in

Choose Use Gemini API Key, or set security.auth.selectedType to gemini-api-key in settings.json.

404

No available channel for model … (distributor)

The model was not pinned, so Gemini CLI asked for one of Google’s own IDs. Set GEMINI_MODEL or model.name.

401

Invalid token

Check GEMINI_API_KEY. Also remove GOOGLE_API_KEY and Vertex AI variables such as GOOGLE_GENAI_USE_VERTEXAI; they change which key and endpoint are used.

Other models fail in Gemini CLI

Gemini CLI uses the Gemini format, which only Gemini models accept. For other models, use an OpenAI-format tool such as Cline.

Something else? Look up the exact message in Errors.