DataEyesAI
Official SiteConsoleDocs HomeGetting StartedDeveloper Tools
AI Models API
Official SiteConsoleDocs HomeGetting StartedDeveloper Tools
AI Models API
  1. Developer Tools
  • OpenClaw
  • Claude Code
  • Codex
  • Gemini CLI
  • Grok CLI
  • Other Tools
  1. Developer Tools

Gemini CLI

Gemini CLI Integration with DataEyesAI#

Google's official Gemini CLI is an exceptionally powerful terminal AI tool with a highly praised interactive interface. Through a simple environment variable configuration, you can seamlessly switch its default cloud compute to the high-performance model service provided by DataEyesAI.

1. Prerequisites (3 Core Parameters)#

Before you begin, make sure you have the following 3 parameters. Pay special attention to the Base URL format requirement:
ParameterValueNotes
API Keysk-xxxxxxxxxxxxxxxxRaw plaintext key from the DataEyesAI console — do not add a Bearer prefix.
Base URLhttps://platform.dataeyes.aiDo NOT include /v1. Gemini CLI automatically appends its own official path to the end.
Model NameA Gemini model name supported by DataEyesAIRecommended: native model names such as gemini-2.5-flash-thinking.

2. Install Gemini CLI#

Gemini CLI requires Node.js. Make sure your machine has Node.js installed.
If Node.js is not available, click here to download it
Open a terminal (PowerShell recommended on Windows, Terminal on Mac) and run the following official command to install globally:

3. Set Environment Variables (Critical Step)#

Gemini CLI does not recognize generic OpenAI environment variable names. You must use its own dedicated variable names (GEMINI_API_KEY, GOOGLE_GEMINI_BASE_URL, etc.).
Copy and modify the commands below (replacing the placeholders with your own API Key and model name), then run them in your terminal:
Windows (PowerShell):
$env:GEMINI_API_KEY="sk-your-dataeyes-key"
$env:GOOGLE_GEMINI_BASE_URL="https://platform.dataeyes.ai"
$env:GEMINI_MODEL="gemini-2.5-flash-thinking"
Windows (CMD):
set GEMINI_API_KEY=sk-your-dataeyes-key
set GOOGLE_GEMINI_BASE_URL=https://platform.dataeyes.ai
set GEMINI_MODEL=gemini-2.5-flash-thinking
macOS / Linux:
Pro tip: The environment variables above are only valid for the current terminal session by default. For permanent effect, add them to your system's "Advanced System Settings → Environment Variables", or write them into your Mac/Linux ~/.bashrc / ~/.zshrc configuration file.

4. Launch and First-Run Prompts#

After injecting the environment variables, type the following command in the same terminal window to start:
Possible first-run prompts:
1.
Install VS Code plugin: If prompted with Do you want to connect VS Code to Gemini CLI?, it is strongly recommended to press 1 (Yes). This allows the AI to directly read code from your editor.
2.
Automatic login skip: Because you have correctly set the environment variables, the program will automatically skip the login menu and drop you into an interactive session with a > prompt.
Type Hello, please introduce yourself. after the > prompt. If you receive a response quickly, the integration is complete!

5. FAQ#

Q1: Error Invalid URL (POST /v1/v1beta/models/...:streamGenerateContent)
Cause: This is the most common mistake. It means your GOOGLE_GEMINI_BASE_URL was set to https://platform.dataeyes.ai/v1.
Fix: Remove the trailing /v1 from the URL. It must be the clean root domain https://platform.dataeyes.ai. Restart the terminal and test again.
Q2: A flood of red [API Error: Content generator not initialized] errors appears on launch, and it forces me to choose an authentication method?
Cause: Gemini CLI did not read your environment variables.
Fix:
1.
Check that you did not accidentally name the variable OPENAI_API_KEY — it must be GEMINI_API_KEY.
2.
Check whether you closed the terminal after setting the environment variables. Always run gemini in the same window where you set the variables.
Q3: During a conversation, it says the model was not found or is invalid?
Fix: Check that the model name set in $env:GEMINI_MODEL (or GEMINI_MODEL) is correct. For best results, test with the exact full name of a real Gemini-series model available on the DataEyesAI platform.
Previous
Codex
Next
Grok CLI