Google's `gemini-api` CLI Lets You Run Gemini 4 Neon Inside Claude Code, Codex, and Pi
This removes the need to switch harnesses to get Gemini 4 Neon and Google's multimodal models inside existing Claude Code or Codex workflows. It also shows an alternative to MCP that keeps agent context small, which matters for long sessions where context inflation is the real bottleneck.
Google has shipped `gemini-api`, a Go-compiled single-file executable that exposes Gemini 4 Neon and the rest of its multimodal stack to third-party coding agents. Unlike the interactive `gemini-cli`, this is a stateless command-line tool: the host agent, whether Claude Code, Codex, or Pi, keeps the context and execution plan, and calls `gemini-api` subcommands for text, image generation, TTS, transcription, file analysis, and hosted agents. The binary is Apache 2.0 and runs on macOS, Linux, and Windows.
Installation is a single curl command or `go install`, followed by setting a `GEMINI_API_KEY` from AI Studio. Plugin installs exist for Claude Code and Codex, and four optional rules can go into `CLAUDE.md` or `AGENTS.md` instead. Use cases include cross-reviewing code with Gemini 4 Neon at `xhigh` thinking, generating cover images and podcast intros, end-to-end voice testing without a microphone using fake media streams, background deep research with `agent run --background`, and analysis of large PDFs and meeting recordings through the Files API with a 14 MB inline threshold and 48-hour retention.
Under the hood, every subcommand hits the same `POST /v1beta/interactions` endpoint, Google's Interactions API. The CLI embeds its documentation in the binary and queries it on demand instead of loading all tool specs into the agent's context like MCP, and writes media files to disk rather than returning Base64 strings. A built-in `gojq` and TOON output shrink token usage. Source code also documents a BYOS mode, `gemini-api environments connect`, for running agent sandboxes on your own machines when code must not leave the intranet.
The on-demand documentation and disk-based media output directly attack context inflation, a known pain with MCP; this suggests Google expects agent sessions to be long enough that tool specs and Base64 media are the real cost.
BYOS support signals a concession to enterprises that will not upload proprietary code to a third-party cloud sandbox; without it, the hosted agent feature would be a non-starter in many organizations.
Free-tier returns 429 on flagship models, so the tool's actual value sits behind a paid API key; for hobbyists, it is a teaser rather than a complete replacement.
Does this mean Google AI members can use third-party code agents?