Google’s Gemini API CLI is having a second moment. The open-source tool, a single binary called gemini-api, lets any coding agent with shell access, such as Claude Code, Codex or Cursor, call Gemini models for text, images, speech, video, file analysis and background research. Google AI Studio lead Logan Kilpatrick pushed it again on November 25 as the easy way to use Gemini 4 Neon from the agent you already have. For developers the idea is attractive: keep your favourite agent, add Google’s media and analysis models on demand. Here is how it works, what it costs, and the defaults worth changing before you hand it to an agent.
What Google shipped
PSA, we tried to make it super easy for your coding agent of choice to use Gemini Neon and all of our models via the Gemini API CLI we shipped a few weeks ago!
— Logan Kilpatrick (@OfficialLoganK) November 25, 2026 · View on X
It is open source and just requires an API key to get started:
The repository describes a stateless Go binary for macOS, Linux and Windows under the Apache 2.0 licence. Each call stands alone: your agent supplies the context, picks the model and decides the next step. The main commands map to Gemini API features:
| Command | What it does | Default model |
|---|---|---|
generate | Text and multimodal generation | gemini-4-hydrogen |
analyze | Questions about PDFs, images, audio, video, CSV or YouTube links | gemini-4-hydrogen |
image | Generate or edit images | gemini-nano-banana-2.1 |
tts, music, video | Speech, music and video generation | gemini-3.8-flash-tts, lyria-3.5, gemini-omni-1.2-flash |
transcribe | Audio or video to Markdown, text, JSON or SRT | gemini-3.5-transcribe |
agent run | Start managed agents such as Deep Research, optionally in the background | set per agent |
Source: google-gemini/gemini-api-cli README, retrieved November 26, 2026.
The tool is labelled beta and “evolving alongside the Gemini Interactions API”, Google warns that breaking changes may occur between releases, and the project does not accept outside pull requests. It is also a different product from Gemini CLI, Google’s interactive terminal coding agent, which we covered with its Conductor extension. The similar names already confuse people.
Built to be read by agents
The most thoughtful part is the machine interface. --usage prints the full command tree in a machine-readable format, --schema prints the JSON schema for any request body, and --dry-run validates a call and shows the HTTP request with credentials redacted, without touching the network. An --agent-mode flag returns structured JSON errors, and exit codes separate API failures (1), bad usage (2) and authentication problems (3). In practice that means an agent can learn the tool from the binary itself instead of from a prompt you wrote.
Google suggests simply telling the agent to use the CLI, or adding a line to AGENTS.md. A minimal setup looks like this:
export GEMINI_API_KEY="your-key"
gemini-api models list --all
gemini-api image "Flat illustration of a bike courier" --out ./assets/ --dry-runThe defaults worth changing
The default text model is not Neon. The README lists gemini-4-hydrogen, Google’s budget model, as the default for generate and analyze. If you want Neon, the agent has to pass it with --model. Run gemini-api models list --all to see the exact model IDs your key can use.
It bills your API key, not your subscription. The CLI authenticates with a Gemini API key, so usage runs through API pricing, which for Neon is $3 per million input tokens and $15 per million output tokens. A Google AI Pro or Ultra subscription does not cover it. One developer replied to Kilpatrick asking for exactly that.
Your agent can see the key. Anything an agent runs as a subprocess can usually read its environment variables. Use a separate API key in its own project with a spending cap, so a runaway loop or a prompt injection costs you a capped amount rather than an open one.
Uploads stay on Google’s servers for 48 hours. Large files go through the Files API, which the README says keeps them for 48 hours. Check your key’s tier too: Google’s API terms treat free-tier data differently from paid use.
Review the installer. The quick install pipes a script from GitHub into bash. Teams that care about supply chain safety should use the prebuilt release binaries or go install with a pinned version, which Google itself recommends for CI.
Where Gemini actually helps your agent
Pairing models makes sense when each does what it is best at. SemiAnalysis’s new GDPx leaderboard, which we broke down by domain, puts Neon first in biology but at 4.4 percent in software engineering, far behind Claude Fable 5.2. So the sensible split is to keep Claude or Codex as the builder and call Gemini for what the CLI is really strong at: images, voiceovers, transcripts, PDF and video analysis, and long background research runs that return an interaction ID you poll later. Our comparison of Claude Code and Codex usage shows how many developers already mix agents this way.
What is still open
Google has not said when the CLI leaves beta, whether subscription access will follow, or how managed-agent runs are billed once the preview ends. The release cadence also matters: with breaking changes allowed, pin a version before you build it into a pipeline. Our Gemini hub follows the model and tool releases as they land.
i10x Perspective
This is a smart distribution play. Google does not need to win the coding-agent war if it can sit inside every agent as the media and analysis back end, and a self-describing CLI is the cheapest way to get there. For users it is a genuine convenience, but the defaults are tuned for ease, not cost or safety. Ten minutes spent on a capped key, a pinned version and an explicit model choice is what turns it from a demo into a tool.






