Skip to content
繁體中文
Agent Quick Start

Connect Gemini CLI to Tokatlas ​

Configure Gemini CLI with a Tokatlas key, endpoint, and enabled model.

Integration prerequisite

This is a conditional setup guide. First confirm a native Gemini generateContent endpoint and model available to your Tokatlas account. An Interactions-only route cannot be used directly by Gemini CLI. Proceed after confirming those details.

Before You Start ​

Install with npm install -g @google/gemini-cli using the Node.js version required by the official installation guide.

Prepare a Tokatlas API key and a model enabled for your account. Replace all YOUR_... placeholders. Back up existing settings before merging changes.

Connection Settings ​

SettingValue
Provider nameTokatlas
ProtocolGemini generateContent
EndpointSee the compatibility requirements below
API KeyYOUR_TOKATLAS_API_KEY
Model IDYOUR_TOKATLAS_MODEL_ID

Setup ​

  1. Confirm that your Tokatlas route exposes native Gemini generateContent and streaming operations. The Interactions API alone is insufficient.
  2. After obtaining the confirmed Gemini base URL, set the variables below and select API-key authentication in Gemini CLI.
  3. Use an enabled Gemini model and test a short request. Verify the request destination in gateway logs.

Configuration Example ​

bash
export GEMINI_API_KEY="YOUR_TOKATLAS_API_KEY"
export GOOGLE_GEMINI_BASE_URL="https://YOUR_CONFIRMED_GEMINI_GATEWAY_BASE"
gemini

Compatibility Notes ​

Tokatlas native Gemini CLI compatibility is not established by the current repository. Do not substitute /v1beta/interactions for the base URL or assume Chat Completions is interchangeable. The override applies to Gemini API-key authentication, not Google account or Vertex authentication. In PowerShell use $env:NAME = "value".

Verify and Troubleshoot ​

  1. Open a new conversation and send “Reply with OK only”; check that text returns.
  2. Check Tokatlas usage for a successful request at the same time with the configured model.
  3. If you need tools, ask the client to list files in a test directory and check that the tool result returns to the conversation.
  4. If step 1 fails, test the key and model directly using API Basics. If that succeeds, troubleshoot client settings below.
ProblemCheck
401 / 403Re-enter the Tokatlas key without quotes or spaces; check the auth mode and model access.
404Compare the full request URL with the table above; remove a duplicated /v1 or endpoint suffix.
Unknown modelCopy an enabled ID from the model list, save it, and select that model in a new chat.
Tool failureModel capabilities and client protocol support.
Changes ignoredSelect the Tokatlas provider/profile, fully quit the client, and reopen it.

References ​