Theme
Language

Gemini CLI

Connect Gemini CLI to GetVibe API: GOOGLE_GEMINI_BASE_URL and GEMINI_API_KEY, any catalog model over the native Gemini API (generateContent, streamGenerateContent).

Gemini CLI speaks the native Gemini API (/v1beta/models/…:streamGenerateContent, key in x-goog-api-key). The API accepts that protocol and runs it through the same pipeline as /v1/chat/completions: any model in the catalog works from Gemini CLI, not only Gemini, with the same billing, limits and Generations history.

Install

npm install -g @google/gemini-cli

Setup

Select API-key sign-in in ~/.gemini/settings.json — without it Gemini CLI in -p mode answers “Invalid auth method selected”:

{
  "security": { "auth": { "selectedType": "gemini-api-key" } }
}

Address and key go in environment variables. The base URL has no /v1beta: the client appends the path itself.

export GOOGLE_GEMINI_BASE_URL="https://getvibeapi.com"
export GEMINI_API_KEY="sk-pv-…"

Check

gemini -m deepseek-v4.1-flash -p "Reply: ready"

Pick the model with -m or model.name in settings.json — any ID from the catalog works, including a channel :suffix. Tool calls (reading files, shell, edits) work as usual. For automated runs outside a trusted folder add GEMINI_CLI_TRUST_WORKSPACE=true.

What is supported

ParameterTypeDescription
:generateContent / :streamGenerateContentPOSTtext, images (inlineData), systemInstruction, tools/functionDeclarations, toolConfig, responseSchema, thinkingConfig
:countTokensPOSTan estimate (~4 characters per token); the exact count is in the response usageMetadata
/v1beta/modelsGETthe catalog model list in Gemini format
Keyheaderx-goog-api-key, ?key= or Authorization: Bearer — your sk-pv-… key
usageMetadata carries cachedContentTokenCount and thoughtsTokenCount. Google built-in tools (googleSearch, codeExecution), the Files API, embedContent and cached contents are not supported: built-in tools are skipped silently, and embeddings are served at /v1/embeddings.

The same address works for the @google/genai and google-genai SDKs: pass httpOptions: { baseUrl: 'https://getvibeapi.com' } (Python: http_options={'base_url': 'https://getvibeapi.com'}) and your sk-pv-… key as apiKey.

Gemini CLI + GetVibe API — native Gemini API | GetVibe API