Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

gemini-api-cli

Skill by google-gemini

Lets an assistant call the Gemini API from the shell with the gemini-api CLI. It covers media generation, file and YouTube analysis, transcription, Deep Research and sandboxed agents.

  • Score 84
  • 5k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install gemini-api-cli

Built from the published package, never by AI.

git clone --depth 1 https://github.com/google-gemini/gemini-skills /tmp/gemini-skills && mkdir -p ~/.claude/skills && cp -r /tmp/gemini-skills/skills/gemini-api-cli ~/.claude/skills/gemini-api-cli

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install gemini-api-cli in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill teaches an assistant to use the gemini-api CLI, which exposes every Gemini API resource as a shell subcommand. It covers image, text-to-speech, music and video generation, analysis of local files and YouTube URLs, audio and video transcription, Deep Research runs, and sandboxed agent environments. Media commands write files to disk and print only the file path. The CLI also offers --dry-run previews and --jq filtering without an external jq.

The source says to use gemini-api for terminals, scripts and CI jobs, and the Google GenAI SDKs for application code or bidirectional Live API WebSockets. Credentials can come from flags, environment variables, the OS keychain or a config file. Running gemini-api whoami shows which credential source is active.

Written from the project's SKILL.md and checked against it.

What it can do

  • Image generationCreates images with gemini-api image, with aspect ratio and image size options.
  • Text-to-speechWrites speech to a 24 kHz WAV file and supports multi-speaker dialogue.
  • Music and videoGenerates music tracks and MP4 videos, polling until the job finishes.
  • File and YouTube analysisAnswers questions over PDFs, media, CSV, text and YouTube URLs.
  • TranscriptionTranscribes audio or video to md, text, json or srt output.
  • Deep ResearchRuns Deep Research agents in the background and checks their status.
  • Sandboxed agentsRuns agents in remote Linux sandboxes with Bash, Python, Node and file operations.
  • Multi-turn chatChains turns with --previous-interaction-id so state is kept server-side.
  • Structured outputPasses JSON schemas, tools and generation settings inline with --body.

What you need

  • Gemini API key or access token
  • macOS or Linux for the install script
  • A shell environment

Try asking

  • Generate a 16:9 isometric cloud database icon with gemini-api.
  • Transcribe this call recording to an SRT file with gemini-api.
  • Run a Deep Research report on WebRTC SFU architectures.

Good to know

  • Local inputs are capped at about 14 MB (20 MB base64).
  • Uploaded files expire after a 48 hour TTL.
  • Transcription does not accept YouTube URLs.
  • An exported GEMINI_API_KEY overrides keychain or config credentials.

Security check

C
  • Downloads a script from the internet and runs itIn skills/gemini-api-cli/SKILL.md: curl -fsSL https://raw.githubusercontent.com/google-gemini/gemini-api-cli/main/scripts/install.sh | bash

Checked automatically: skills/gemini-api-cli/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md12 KB

Alternatives to gemini-api-cli

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

gemini-api-cli: common questions

How is gemini-api different from the Gemini CLI?

The source says gemini-api is a stateless Gemini API client. It is distinct from the interactive @google/gemini-cli coding agent.

Why is my billing going to another project?

An exported GEMINI_API_KEY overrides credentials stored in the keychain or config.yaml. Run gemini-api whoami to see which source won.

Do I need jq installed to filter output?

No. The --jq flag filters JSON in-process, so no external jq is needed.

How do I install gemini-api-cli?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is gemini-api-cli free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is gemini-api-cli safe to use?

It scores 84 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.

What are alternatives to gemini-api-cli?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

gemini-api-cli Install

Add to stack

Loading.