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.
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-cliRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/google-gemini/gemini-skills /tmp/gemini-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/gemini-skills/skills/gemini-api-cli ~/.gemini/antigravity-cli/skills/gemini-api-cliAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
