Skip to content
aicoolies logo
Gemini API CLI (google-gemini) logo

Gemini API CLI

Google's beta command-line tool that lets coding agents and scripts call Gemini models, media generation and managed agents

Gemini API CLI (gemini-api) is Google's Apache-2.0, beta command-line tool for the Gemini Interactions API. One stateless Go binary lets Claude Code, Codex, Antigravity and other shell-capable agents generate text, images, speech, music and video, analyze PDFs, media and YouTube URLs, transcribe recordings, and launch background managed agents such as Deep Research. It offers --dry-run previews, JSON or TOON output and an agent mode. It is not a coding agent.

About Gemini API CLI

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.

Pricing & Platform Specs

Pricing Summary

The CLI is free and open source under the Apache License 2.0. It calls the Gemini API with your own API key (GEMINI_API_KEY from Google AI Studio), so requests are billed, or count against free-tier limits, at standard Gemini API rates for the models and agents you use; see the Gemini API pricing page.

full pricing breakdown →

Supported Platforms

Single Go binary for macOS, Linux and Windows (install script, GitHub Releases or go install); requires a Gemini API key

Explore categories, tags & use cases

OpenAI's official command-line tool for calling the OpenAI REST API from your terminal and scripts

OpenAI CLI (openai) is OpenAI's official Apache-2.0 command-line tool for the OpenAI REST API. Commands mirror API resources, so you can create Responses, generate and edit images, upload and download files, submit and wait for Batch jobs, and query admin endpoints such as organization usage from a shell or script. Output can be readable text, JSON, JSONL or YAML with GJSON transforms. It is not a coding agent; for that OpenAI points to Codex CLI.

Open Source

Community experience

Sources & verification

Sources checked
Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.

FAQ

What is Gemini API CLI?

Gemini API CLI (gemini-api) is Google's Apache-2.0, beta command-line tool for the Gemini Interactions API. One stateless Go binary lets Claude Code, Codex, Antigravity and other shell-capable agents generate text, images, speech, music and video, analyze PDFs, media and YouTube URLs, transcribe recordings, and launch background managed agents such as Deep Research. It offers --dry-run previews, JSON or TOON output and an agent mode. It is not a coding agent.

Is Gemini API CLI free?

Yes — Gemini API CLI is open source and free to use. The CLI is free and open source under the Apache License 2.0. It calls the Gemini API with your own API key (GEMINI_API_KEY from Google AI Studio), so requests are billed, or count against free-tier limits, at standard Gemini API rates for the models and agents you use; see the Gemini API pricing page.

Is Gemini API CLI open source?

Yes — Gemini API CLI is open source.

Is Gemini API CLI still maintained?

Yes — Gemini API CLI is active. Its listing was last verified on October 24, 2026.

What are the best Gemini API CLI alternatives?

The first editor-selected Gemini API CLI alternatives are OpenAI CLI.