Skip to main content
Gemini CLI can connect to APIAny.AI through environment variables or local configuration files. It is useful for terminal, editor, and automated development workflows.

Prerequisites

  • Gemini CLI is installed.
  • You have created an API key in the APIAny.AI dashboard.
  • You have selected a model ID.

Install

Configure environment variables

macOS / Linux:
Windows PowerShell:

Troubleshooting

401 or authentication errors

Make sure the API key is copied completely, has no extra spaces, and is enabled in the APIAny.AI dashboard.

The model does not appear in the app

Enter the model ID manually and confirm it is available in the model catalog. Some tools do not fetch model lists automatically.

Which Base URL should I use?

OpenAI-compatible settings usually use https://apiany.ai/v1; Claude-compatible settings usually use https://apiany.ai; tools that ask for a full endpoint use https://apiany.ai/v1/chat/completions.