gemini-api

gemini-api is a skill for Claude Code from sanjay3290/ai-skills. It costs 177 tokens per session (1,999 once invoked), scanned A, original, Apache-2.0.

A command-line tool for calling Google's Gemini AI services from a shell. Gemini can handle text, images, audio, video, documents, speech, and other supported tasks.

In plain words
What is it for?
Use it for text generation and reasoning, media creation or editing, transcription, file analysis, captions, and background research tasks when the command is installed and configured.
Why use it?
It provides one documented way to invoke Gemini from scripts or an agent instead of writing direct API requests.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ai-skills plugin — 25 skills shipped together

Good fit Use it for text generation and reasoning, media creation or editing, transcription, file analysis, captions, and background research tasks when the command is installed and configured.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sanjay3290/ai-skills/gemini-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sanjay3290/ai-skills --skill gemini-api
Clone the repo
git clone --depth 1 https://github.com/sanjay3290/ai-skills

Made for: Claude Code.

Or install ai-skills, the plugin that ships this one along with the rest of its 25 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gemini-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/sanjay3290/ai-skills/gemini-api/github.svg)](https://agentmods.dev/skills/sanjay3290/ai-skills/gemini-api)
Your own site
<a href="https://agentmods.dev/skills/sanjay3290/ai-skills/gemini-api"><img src="https://agentmods.dev/badge/skills/sanjay3290/ai-skills/gemini-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gemini-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/sanjay3290/ai-skills/gemini-api"><img src="https://agentmods.dev/badge/skills/sanjay3290/ai-skills/gemini-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 177 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,999 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00177 $0.01999
Opus 5.5 $0.00071 $0.00800
Sonnet 5.5 $0.00035 $0.00400
Haiku 4.5 $0.00018 $0.00200

Measured 28d ago against content hash 254be6564a28, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gemini-api scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 28d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

`curl` calls against the REST API as a substitute.
skills/gemini-api/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gemini API from the shell

gemini-api is Google's single-binary CLI for the Gemini Interactions API. Each invocation does one thing and returns either text on stdout or a file path on disk.

Verified command details, output shapes, and gotchas: references/cli.md.

Preflight (once per session, before the first call)

gemini-api whoami prints the config file, the credential source, and the active defaults. If it reports no API key, stop and ask the user to set one — never guess at a key or edit their config. The persistent form is gemini-api configure --api-key "...", which writes to the OS keychain; GEMINI_API_KEY in the environment also works.

If the binary is missing, say so and offer to install it from https://github.com/google-gemini/gemini-api-cli (install.sh, or go install github.com/google-gemini/gemini-api-cli/cmd/gemini-api@latest). Do not pipe an install script into a shell without the user agreeing first, and do not hand-roll curl calls against the REST API as a substitute.

The CLI is beta and the Interactions API moves fast. When a flag in this skill is rejected, trust the binary: run --help on that command and adapt.

The discovery loop

Never guess a flag. The binary describes itself, offline and without credentials:

Need Run
Which command, which flags gemini-api <cmd> --help
The whole command tree, machine-readable gemini-api --usage (KDL)
The exact request body schema gemini-api <cmd> --schema
Validate before spending a call gemini-api <cmd> ... --dry-run
Every global flag gemini-api --help-global

--dry-run makes no network call and does not read the keychain, but it does read local --input files, so it also checks that they exist and that the MIME type is detected.

Pick the command for the task

Task Command Default model
Ask a model, stream the reply generate gemini-3.8-flash
Generate or edit an image image gemini-nano-banana-2.1
Voiceover, narration, two-speaker dialogue tts gemini-3.8-flash-tts
Music bed, soundtrack music lyria-3.5
Video clip, or edit one conversationally video gemini-omni-1.1-flash
Question about a PDF, image, audio, video, CSV, or YouTube URL analyze gemini-3.8-flash
Transcript or SRT captions transcribe gemini-3.5-transcribe
Long-running research or agent task agent run --background --agent deep-research-preview-04-2026
Reuse a file over several calls, or send >14 MB of media files upload --wait —
See what models this key can reach models / models list --all —

Read the full file on GitHub · 142 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 28d ago First seen · 142 lines · 177 tokens per session scan A 254be6564a28

Subscribe to this mod's changes

gemini-api is a skill published in the GitHub repository sanjay3290/ai-skills (463 stars, last pushed 28d ago), licensed Apache-2.0. It adds 177 tokens to every session and 1,999 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-03.

Related

gemini-api compared with skills from other repositories

gemini-api next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gemini-apisanjay3290/ai-skillsSkill46328d agoApache-2.0A177Claude Code
image-prompt-engineergenfeedai/skillsSkill3todayMITA58Claude Code
prompt-generatorgenfeedai/skillsSkill3todayMITA46Claude Code
gemini-api-devaiskillstore/marketplaceSkill509todaynoneA96Claude Code, Codex
coreaiskillstore/marketplaceSkill509todaynoneA42Claude Code, Codex
gemini-live-api-devaiskillstore/marketplaceSkill509todaynoneA110Claude Code, Codex
mloda-pluginsaiskillstore/marketplaceSkill509todaynoneA85Claude Code, Codex