MultimodalGoogleGemini
Evidence check
  • Preprint
  • No code released
  • Not independently replicated

Gemini API CLI Lets Claude Code and Codex Call Gemini: Setup and Caveats

Google's open-source gemini-api binary lets any shell-capable coding agent use Gemini for images, analysis and research. Its default model is not Neon, it bills your API key, and four other defaults deserve a look.

Christopher Ort
By i10X News Desk · Reviewed by Christopher Ort · 4 min read
Share
A developer's desk at night with a blurred terminal on a laptop, a sketchbook with robot drawings and headphones beside it.
Image: AI-generated, i10X
On this page
  1. What Google shipped
  2. Built to be read by agents
  3. The defaults worth changing
  4. Where Gemini actually helps your agent
  5. What is still open
  6. i10x Perspective

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

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:

CommandWhat it doesDefault model
generateText and multimodal generationgemini-4-hydrogen
analyzeQuestions about PDFs, images, audio, video, CSV or YouTube linksgemini-4-hydrogen
imageGenerate or edit imagesgemini-nano-banana-2.1
tts, music, videoSpeech, music and video generationgemini-3.8-flash-tts, lyria-3.5, gemini-omni-1.2-flash
transcribeAudio or video to Markdown, text, JSON or SRTgemini-3.5-transcribe
agent runStart managed agents such as Deep Research, optionally in the backgroundset 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:

AGENTS.md · Bash
export GEMINI_API_KEY="your-key"
gemini-api models list --all
gemini-api image "Flat illustration of a bike courier" --out ./assets/ --dry-run

The 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.

Christopher Ort

Christopher Ort

Christopher Ort is the editor of i10X News at i10x.ai. He has worked hands-on with AI tools, models and agent workflows for years and leads i10X’s coverage of AI launches, funding and research. He is the author of “The Style Penalty”, an SSRN study on how frontier AI models judge AI-written CVs, covered by heise online and t3n.

Timeline

What happened before

  1. Release

    Gemini 4 Argon

    1.05M context · $2 / $10 per 1M tokens

    Google's most capable model for complex coding, agentic, math and science tasks.

    ai.google.dev (source, opens in a new tab)
  2. Release

    Gemini 3.8 Flash

    1.05M context · $0.75 / $3.75 per 1M tokens

    ai.google.dev (source, opens in a new tab)
  3. Release

    Gemini 3.7 Flash

    1.05M context · $0.75 / $3.75 per 1M tokens · Deprecated 8 Oct 2026 (API routes to Gemini 3.8 Flash)

    ai.google.dev (source, opens in a new tab)
  4. Release

    Gemini 3.6 Flash & 3.5 Flash-Lite

    1.05M context · $0.75 / $3.75 per 1M tokens

    ai.google.dev (source, opens in a new tab)
  5. Release

    Gemini 3.5 Flash

    1.05M context · $1.5 / $9 per 1M tokens · Deprecated 8 Oct 2026 (API routes to Gemini 3.6 Flash)

    Launched at I/O 2026 as the first Gemini 3.5 model; Google later dropped the planned 3.5 Pro.

    blog.google (source, opens in a new tab)
Full Gemini timeline ›

Editor's picks

  1. GPT-6.2 Limits Hit 40% Sooner After OpenAI Billing Fix: When to Use the Reset
  2. Analysis: AI Chip Export Rule Stalls Nvidia Servers in Southeast Asia
  3. HungerG Stealth Model Is Free Until Nov 30: Where Your Code Goes
  4. Obsidian Connectors for AI Agents: What They Can Reach and What to Check
  5. Perplexity Time Machine: How It Compares With Exa and Epochal for Backtests