Gemini CLI
Gemini CLI is Google's official Gemini command-line tool. TokOne supports the Google protocol (/v1beta), so you can use Gemini models with the config below.
Install
bash
npm install -g @google/gemini-cliVerify:
bash
gemini --versionConfigure
Gemini CLI uses two environment variables: GEMINI_API_KEY and GEMINI_BASE_URL.
Base URL is /v1beta
Google's official protocol root is /v1beta (not /v1), and TokOne follows the same path.
bash
export GEMINI_API_KEY="sk-xxx"
export GEMINI_BASE_URL="https://api.tokone.ai/v1beta"powershell
$env:GEMINI_API_KEY = "sk-xxx"
$env:GEMINI_BASE_URL = "https://api.tokone.ai/v1beta"To persist it, add it to ~/.zshrc (macOS) / ~/.bashrc (Linux) / Windows user-level environment variables.
Verify
bash
gemini "Reply with OK"A reply means the config works.
FAQ
404 even though the key is correct
The Base URL is missing /v1beta. Google's protocol root differs from OpenAI's, so you must include /v1beta explicitly.
model not found
Check the model ID (e.g. gemini-3.5-flash); see the Models page for the available list.
SSL / certificate errors
Make sure the protocol is https://, not http://.
Next steps
- Models — available Gemini models
- API Endpoints — Gemini-compatible protocol notes