Agent skill · google-gemini
gemini-api-cli
Call the Gemini API from the shell with gemini-api. Use for media generation (images, TTS, music, video), file and YouTube analysis, audio/video transcription, Deep Research, and sandboxed agents.
What it needs
About 6k tokens when loaded.
What this skill does
The gemini-api CLI exposes every Gemini API resource as a shell subcommand. Compared to curl: media and transcription commands decode output to disk and print only the file path, -i attaches local files or files/<id> URIs, --jq extracts fields in-process (raw strings by default, no external jq), --dry-run previews redacted HTTP requests offline, and list endpoints auto-paginate with --all (cap pages with --max-pages N; --page-size sets server page size). CLI vs SDK CLI for shell work, SDK for application code. Use gemini-api from terminals, scripts, and CI jobs to generate media files, analyze local PDFs or recordings, run Deep Research, and manage agent sandboxes (gemini-api is a stateless Gemini API client, distinct from the interactive @google/gemini-cli coding agent). Use the Google GenAI SDKs (gemini-api-dev, gemini-live-api-dev) when calls live inside application source or need bidirectional Live API WebSockets. Install and auth Credentials resolve in order (first match wins): --api-key / --access-token flags, GEMINIAPIKEY / GEMINIACCESSTOKEN env vars, the OS keychain, then ~/.config/gemini-api/config.yaml. Env var (agents and CI): export GEMINIAPIKEY="..." Workstation key: gemini-api configure --api-key "..." saves to the OS keychain. Pass --no-keyring or GEMININOKEYRING=1 on headless Linux to use config.yaml; gemini-api auth logout clears stored keys. Active auth check: gemini-api whoami (add -o json for JSON) prints masked credentials and the winning source. The #1 auth trap: an exported GEMINIAPIKEY overrides credentials stored in the keychain or config.yaml, billing whichever project that env var belongs to. Check gemini-api whoami to see which source won, or run env -u GEMINIAPIKEY gemini-api ... to ignore the env var. Command structure Run gemini-api --help to list commands, or <subcommand> --help for flags and examples (--usage dumps a 45 KB KDL spec, so stick to --help to save context). …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills google-gemini/gemini-api-cli