Core AI Coding Tools

Gemini CLI

Google’s official terminal agent, pointed at the gateway via environment variables.

1Install

Requires Node.js 20 or later.

Terminal
npm install -g @google/gemini-cli
gemini --version

2Configure access

YOUR_API_KEY in the examples is a placeholder and will not work as copied. Sign in to pick one of your keys and fill it into every example on this page.

Sign in to fill in key

Gemini CLI uses two environment variables to connect to the gateway. Save them in its own .env file to load them on startup. Replace YOUR_API_KEY with your API key, or choose a key at the top of the page to fill it in automatically.

Manual setup: write the following to ~/.gemini/.env
GEMINI_API_KEY=YOUR_API_KEY
GOOGLE_GEMINI_BASE_URL=https://api.keyvia.cc
Or run this in your terminal
mkdir -p ~/.gemini && cat <<'EOF' > ~/.gemini/.env
GEMINI_API_KEY=YOUR_API_KEY
GOOGLE_GEMINI_BASE_URL=https://api.keyvia.cc
EOF

GOOGLE_GEMINI_BASE_URL must be the root URL without /v1 or /v1beta; the CLI appends the path. The key’s group must support Gemini.

3Verify

Open your project directory and run gemini. At the initial authentication prompt, choose “Use Gemini API Key”. A successful reply confirms the connection.

KeyVia Logo
KeyVia

One API for full-power Claude, GPT, Gemini and other leading AI models at ultra-low prices.

© 2026 KeyVia. All rights reserved.