Agents use Gemini as a tool

Google on Oct. 26 (Oct. 27 Japan time) released "Gemini API CLI" (command name: gemini-api), a command-line tool for calling the Gemini API from AI agents and scripts. It is an open-source beta, and Philipp Schmid, who serves as Google's developer contact for Gemini, announced it on X.

It is a tool that AI agents with shell access run as one-off commands, rather than an app operated on screen. The official documentation lists Google's Antigravity as well as other companies' agents, such as Anthropic's Claude Code, OpenAI's Codex and Cursor, as places to use it. It requires no additional components to run and can also be built into development automation systems.

Images, video, music and reading

A single tool can call the full range of Google's generative models.

Main commands of Gemini API CLI
CommandWhat it doesModel used
imageImage generation and editing (up to 4K)Nano Banana 2.1
videoVideo generation and editingGemini Omni 1.1 Flash
tts, transcribeText-to-speech, transcriptionGemini 3.8 Flash TTS
musicSong and loop generationLyria 3.5
analyzeReading PDFs, images, audio, video and YouTubeGemini 3.8 Flash
agentResearch tasks such as Deep ResearchDeep Research agent

Not a new coding agent

It is a separate product from "Gemini CLI," which writes programs through conversation, and is not its successor. While Gemini CLI works through tasks by talking with people, Gemini API CLI simply executes a single request from another agent and returns the result or the file location. Authentication uses a Google AI Studio API key, and usage is billed at standard Gemini API rates.

Because it is in beta, compatibility may break even in minor version updates, and Google recommends pinning the version for automation. Files passed directly can be up to 14MB, and larger files must be uploaded first. Uploaded files are deleted after 48 hours. It does not support real-time spoken conversation.