AnyInt Docs
Agent Setup

Configure Gemini CLI

Connect Gemini CLI to AnyInt through the stable Gemini-compatible API.

Gemini CLI connects to AnyInt through the Gemini-compatible API.

Support status

The AnyInt Gemini-compatible API is published as Stable. Gemini CLI is a third-party client, so confirm the custom endpoint variables supported by your installed version.

What you need

  • an AnyInt API key
  • a Gemini-compatible model ID visible to that key
  • Gemini CLI installed and initialized once

Use the model catalog or Models API to choose a model ID available to your account.

Configure Gemini CLI

Gemini CLI commonly reads ~/.gemini/.env on macOS and Linux, or %USERPROFILE%\.gemini\.env on Windows. Add:

GOOGLE_GEMINI_BASE_URL=https://api.anyint.ai/gemini/v1beta
GEMINI_API_KEY=your-anyint-api-key
GEMINI_MODEL=<GEMINI_MODEL_ID>

Protect this file as a credential-bearing local configuration. Do not commit it to a repository.

If your installed Gemini CLI version uses a different custom endpoint variable, follow that version's CLI help. The AnyInt Gemini-compatible base URL remains:

https://api.anyint.ai/gemini/v1beta

Verify the connection

Reopen the terminal, start Gemini CLI, and send:

Reply exactly: AnyInt connected

The setup is complete when Gemini CLI returns the requested text with the configured model.

Common problems

SymptomCheck
The default provider is still usedReopen the terminal and confirm the installed CLI recognizes GOOGLE_GEMINI_BASE_URL.
Authentication failsConfirm GEMINI_API_KEY contains only the AnyInt key value.
The model is unavailableChoose a Gemini-compatible model ID visible to the same key.
File input failsUse a public HTTPS URL for fileData.fileUri, or inline data for small files. Do not use a local path.

For additional diagnosis, use Agent Setup Troubleshooting.

On this page