Integrations
Gemini CLI by CCS
Integration Overview
This page explains how to connect Gemini CLI to UnifyLLM through CC Switch. Add UnifyLLM under Unified Providers, choose the NewAPI preset, enable Gemini CLI, use the /v1 endpoint, and select OpenAI Compatible.
Install Gemini CLI First
Install the client from the Gemini CLI official documentation or release page before configuring CC Switch. The command below is a common npm/pipx method; follow the official page if the current release uses a different command.
- macOS / Linux: use Terminal, iTerm2, or bash/zsh; reopen the shell after installation so PATH changes take effect.
- Windows: use Windows Terminal or PowerShell. Use npm for Node-based tools and pipx for Python tools; avoid mixing Python environments.
- Run the tool's --version or official launch command before adding an API provider, so you know the client itself works.
1# macOS / Linux / Windows Terminal2npm install -g @google/gemini-cli3 4# verify the installation5gemini --versionBefore You Start
- API Base URL: https://api.unifyllm.top/v1
- An active UnifyLLM API key
- A currently available model ID, for example gemini-3.5-flash. Models, groups, and prices can change; use the live pricing page and console model list as the source of truth.
Configure It in CC Switch
- 1
Install and open CC Switch
Open provider management and select Gemini CLI in the application switcher.
- 2
Open Unified Providers
Click + and add UnifyLLM under Unified Providers, not under an application-specific provider list.
- 3
Choose the NewAPI preset
Set the preset type to NewAPI and name the provider UnifyLLM.
- 4
Choose the format and endpoint
Select OpenAI Compatible, use https://api.unifyllm.top/v1, and paste your API key. Never put the key in screenshots, repositories, or public logs.
- 5
Add and select a model
Add gemini-3.5-flash or choose the exact ID from Get Models. If the list is empty, check the endpoint, key, and whether /v1 was entered twice.
- 6
Enable the provider
Enable the card and restart the tool as required by Gemini CLI. Add UnifyLLM under Unified Providers, choose the NewAPI preset, enable Gemini CLI, use the /v1 endpoint, and select OpenAI Compatible.
Recommended Values
Protocol: OpenAI Compatible
Endpoint: https://api.unifyllm.top/v1
Example model: gemini-3.5-flash
1API Base URL: https://api.unifyllm.top/v12Protocol: OpenAI Compatible3Model: gemini-3.5-flash4Authorization: Bearer <YOUR_API_KEY>Manual Configuration Reference
If you are not using CC Switch, the following is a reference for the common configuration format of this tool. Field names can change between releases, so prefer the tool's own documentation when it differs.
1Provider: UnifyLLM2Preset: NewAPI3API format: OpenAI Compatible4Base URL: https://api.unifyllm.top/v15API key: <YOUR_API_KEY>6Model: gemini-3.5-flashTest and Troubleshoot
Restart Gemini CLI after saving the provider and run a small prompt. If your Gemini CLI version uses a different custom-endpoint variable, use the CC Switch Gemini provider instead of guessing a variable name.
API references: Chat Completions, Responses, Messages, and Generate Content.
- Start with a short request before running a large workload.
- Match the model ID exactly with the pricing page and console, including any group prefix.
- Review console usage logs for delivery, the actual model, token usage, and errors.
- If the tool appends /v1 automatically and you entered /v1 manually, remove the duplicate path.
Official CC Switch References
This guide references the official CC Switch introduction, Add Provider, and Edit Provider. Field names and paths may change after a CC Switch update; use its latest documentation and application UI as the final reference.
Security Reminder
An API key is an account credential. Use a dedicated key, limit where it is stored, and disable/recreate it immediately if it leaks. Never place it in browser code, a public repository, screenshots, or third-party sync services.