Configure Gemini CLI with CodingRouter

Set up Gemini CLI API access in CodingRouter Connect. Pick a token and model, review the Gemini API-key configuration, and keep a path back to your previous settings.

Prepare Gemini CLI and choose the right tool

Install Gemini CLI independently; Connect does not install it for you. Select Gemini in Connect and sign in to your CodingRouter account. This flow configures the local Gemini CLI connection. It is not a sign-in flow for the Gemini consumer website or a transfer of its subscription.

Choose an allowed token and model

Open Quick setup and choose a usable token with the group you intend to use. Select a model from the list returned by the existing API. If no token is available, confirm the quota and expiry when creating one. An empty model list needs an account or token-permission check; inventing a model ID will not make it available.

Review environment and authentication settings

Connect prepares GOOGLE_GEMINI_BASE_URL, GEMINI_API_KEY and GEMINI_MODEL, along with Gemini's gemini-api-key authentication selection and model setting. The preview covers the local environment and settings files. Confirm the model, group, previous provider and file details before applying. You do not need to copy a key into an .env file manually.

Restart, verify and recover

Start a new Gemini CLI session after applying the configuration. If files changed while the preview was open, obtain a fresh preview first. Use the backup view to restore the previous settings when necessary. Keep backups private because they may include API keys. Configuration success alone does not prove that an actual model request succeeded.

Set up your AI coding tool

Practical guides for API access, model selection and configuration recovery.