Skip to main content

Prepare

Install Gemini CLI, create an APIONE key, and copy the ID of a model supporting the Gemini protocol.

Windows installation

Install and check the version in PowerShell.
PowerShell showing added 12 packages after installing Gemini CLI

Example output of installing Gemini CLI in Windows PowerShell.

The image shows added 12 packages. After installation, run gemini --version to confirm the command is available before proceeding with configuration.

Configure authentication and the endpoint

Add the following to ~/.gemini/.env, where ~ is your home directory:
Replace the key and model placeholders. Use the root address here; the client appends the API version and model path. Start gemini and select API Key authentication. If you already have settings.json, merge this without removing other settings:

Verify

After receiving a response, test reading a file in a test project. Verify tool calls separately from basic text generation.

Troubleshoot

  • A Google login prompt usually means the selected authentication mode is not API Key.
  • For 404, check that /v1beta is not duplicated and that the model supports Gemini.
  • For tool errors, check model capabilities and CLI version before modifying local code.
  • If environment settings are ignored, stop the old process and launch from a new terminal that loads them.
See the official configuration reference for current fields.
Integration directory · Choose a model · Troubleshooting