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-cliSetup
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
| Parameter | Type | Description |
|---|---|---|
:generateContent / :streamGenerateContent | POST | text, images (inlineData), systemInstruction, tools/functionDeclarations, toolConfig, responseSchema, thinkingConfig |
:countTokens | POST | an estimate (~4 characters per token); the exact count is in the response usageMetadata |
/v1beta/models | GET | the catalog model list in Gemini format |
Key | header | x-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.