Gemini API CLI is Google's command-line tool for the Gemini API, published on GitHub under the Apache License 2.0 and installed as the gemini-api binary. Google describes it as a way to give an existing agent, such as Codex, Claude Code, Antigravity, OpenClaw or Hermes, access to Gemini models and managed agents through ordinary shell commands. It is built on the Gemini Interactions API and is currently in beta, so the README recommends pinning a release version in CI because breaking changes may occur.
Commands are grouped by job. generate handles text and multimodal prompts; image, tts, music and video create or edit media and write the files to disk, printing only the file path; analyze answers questions about PDFs, images, audio, video, CSV or YouTube URLs; and transcribe turns recordings into Markdown, text, JSON or SRT captions. The agent command starts interactions with models or managed agents, including background runs that return an interaction ID you can poll later, and further commands manage files, environments, credentials, webhooks and cron triggers.
The interface is designed to be discovered by agents. --usage prints the full command tree in a machine-readable format, --schema prints the JSON Schema for request bodies, and --dry-run validates input and shows the HTTP request with credentials redacted, without a network call. Output can be streamed text, JSON or compact TOON, with inline --jq filtering, and an agent mode returns structured error envelopes. The CLI keeps no local conversation state; API keys can come from an environment variable, the OS keychain or a config file.
It is not a coding agent and does not replace Gemini CLI or Antigravity CLI; it is a toolbox other agents call. The CLI is free, and every request is made with your own Gemini API key, so cost and limits follow the Gemini API free tier or paid rates for the models you choose. Google is not accepting outside pull requests at this time.
