Skip to main content
Gemini CLI is Google’s open-source command-line AI assistant. It uses Gemini’s native generateContent protocol and lets you override the API address with the GOOGLE_GEMINI_BASE_URL environment variable. DreamTo supports this protocol natively.

Prerequisites

  • A recent version of Gemini CLI is installed (gemini --version), for example via npm i -g @google/gemini-cli. GOOGLE_GEMINI_BASE_URL requires a recent version; if yours doesn’t recognize it, upgrade first.
  • You have created an API Key on the API Keys page of the DreamTo console.
  • You have a Gemini model ID, such as gemini-4-hydrogen. For the full list, see Gemini generateContent.

Key settings

Setup

1

Set the environment variables

We recommend putting them in ~/.gemini/.env, which Gemini CLI loads automatically (%USERPROFILE%\.gemini\.env on Windows):
~/.gemini/.env
You can also set them directly in your shell:
2

Choose API Key authentication

Start gemini. If asked to choose an authentication method, pick Use Gemini API Key, not Google sign-in or Vertex AI. If you previously signed in with a Google account, type /auth in the CLI to choose again.
3

Verify

A normal response means the setup works. In interactive mode, type /model to confirm the current model.

FAQ

  • Make sure you’re using API Key authentication, not Google sign-in (use /auth to choose again).
  • Check whether variables such as GOOGLE_API_KEY or GOOGLE_GENAI_USE_VERTEXAI=true are still set in your shell and interfering; unset them if needed.
  • Set GOOGLE_GEMINI_BASE_URL to just https://api.dreamto.ai. Adding /v1beta results in /v1beta/v1beta/....
  • The model ID must be a Gemini model ID from the DreamTo Model Marketplace. Gemini CLI’s built-in default model may not exist on DreamTo, so set GEMINI_MODEL explicitly.
Gemini CLI requires custom addresses to use HTTPS (except localhost). Make sure the address starts with https://.
Gemini CLI uses streamGenerateContent, which DreamTo supports. If the stream drops midway, first check whether a local proxy or corporate gateway is buffering the SSE response.