Use this skill for service operations only. DO NOT use this skill for CLI implementation lifecycle work such as creating, testing, updating, troubleshooting, validating, removing, or documenting the CLI tool itself; delegate those tasks to cli-tool-expert. Execute Gemini API operations using the collision-safe `gemini-api` command. CLI interface for Gemini API -- chat, image generation, video analysis, deep research, file management, and usage tracking. Triggers: gemini, gemini cli, gemini chat, gemini image, gemini research, ask gemini, generate image with gemini, analyze video with gemini, gemini api usage, gemini deep research
Resources
1Install
npx skillscat add adbertram/cli-tools/gemini-cli Install via the SkillsCat registry.
| Task | Command |
|---|---|
| Chat with Gemini | gemini-api chat new "Your prompt here" |
| Chat with file attachment | gemini-api chat new "Describe this" --file image.jpg |
| Generate an image | gemini-api image generate "A sunset over mountains" -o sunset.png |
| Analyze a video | gemini-api video analyze video.mp4 --prompt "Summarize this" |
| Start deep research | gemini-api research start "Research topic" |
| List models | gemini-api models list --table |
| Show API usage | gemini-api usage show --table |
| Check auth status | gemini-api auth status |
| </quick_start> |
Deep Research (Interactions API)
gemini-api research start|status|resume drives the Gemini Deep Research Agent
through the Google GenAI Interactions API. As of the May 2026 breaking
change (legacy schema removed by the API on 2026-06-08), this requires:
google-genai >= 2.0.0(the gemini CLI pins>=2.0.0ingemini/pyproject.toml). SDK 1.x sends the legacy Interactions schema and the
API rejects it with HTTP 400: "The legacy Interactions API schema is no
longer supported … adopt the new 'steps' schema." Ifresearchfails with
that 400, the SDK is too old — reinstall with the cli-tool install script souvresolvesgoogle-genai >= 2.0.0.- The new "steps" schema: a completed
Interactionexposessteps
(not the legacyoutputs) and the convenience propertyoutput_text. The CLI
readsinteraction.output_textfor the final report. Streamed events useevent_typevaluesinteraction.created,step.start,step.delta,step.stop,interaction.status_update,interaction.completed,error
(replacing legacyinteraction.start/content.delta/interaction.complete).step.deltadeltas are typed bydelta.type(text→delta.text,thought_summary→delta.content.text). - Deep Research is background-only and paid-tier-only; a single task can
run 5-20+ minutes.gemini-api research startdefaults to--stream; callers that
capture stdout (e.g. the ClientContentWriterresearch_article.js) use--no-stream, which prints the synthesized report to stdout and exits 0. - Valid
--agentvalues (SDK Literal):deep-research-pro-preview-12-2025
(default),deep-research-preview-04-2026,deep-research-max-preview-04-2026.
Migration reference: https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026
Image Editing / Reference Images
gemini image generate accepts reference images via -i / --input-image (repeatable) for image editing and multi-image composition. Only the Nano Banana models support this (gemini-3-pro-image-preview, gemini-2.5-flash-image); Imagen models (imagen-4.0-*) will error if -i is passed. Images are sent as inline bytes to the Gemini API.
gemini-api image generate "make a slight variation" -i ./ref.png -o out.png
gemini-api image generate "compose these two scenes" -i a.png -i b.png -m gemini-2.5-flash-image