Skip to main content
Google’s Gemini CLI is the official command-line interface for interacting with Gemini models. This tutorial walks you through installing Gemini CLI, configuring it to point at KiosAPI, and verifying that your setup works — so you can use Gemini models through KiosAPI’s unified gateway.

Prerequisites

  • Node.js 18+ — verify with node --version
  • A KiosAPI API key (starts with sk-) from the DashboardToken Management

Usage

Switching Models

Change the default model in ~/.gemini/settings.json:
Or specify a model for a single session:

Available Models

Check the KiosAPI pricing page for the full list of available Gemini models and their costs.

Troubleshooting

Authentication failed

  • Ensure you selected API Key (not Google Login) during setup
  • Verify your API key is correct and starts with sk-
  • Re-run gemini and re-select the auth method if needed

Connection error

  • Check that GOOGLE_GEMINI_BASE_URL in ~/.gemini/.env is https://kiosapi.com/ — with a trailing slash
  • Ensure base_url in settings.json also includes the trailing slash
  • Verify your network connection

Model not found

  • Check the model ID matches exactly (e.g., gemini-2.5-pro, not gemini-pro)
  • Confirm the model is available on KiosAPI by checking the models list

Need Help?