gemini-interactions-api

A set of instructions for writing programs that use Google's Gemini API, a service for generating and understanding text, images, audio, and video. It covers chat, streaming replies, tool calls, structured results, and newer API workflows.

In plain words
What is it for?
Use it when building or updating Gemini integrations for text generation, multi-turn chat, image or video generation, audio transcription or speech, background research, function calling, and structured output.
Why use it?
It helps prevent code from relying on outdated API rules or model names. It also gives one reference for handling different Gemini tasks through the official Google client library.

Skill for Claude CodeCodex

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.

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

Made for: Claude Code, Codex.

Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00080 $0.04676
Opus 5 $0.00040 $0.02338
Sonnet 5 $0.00016 $0.00935
Haiku 4.5 $0.00008 $0.00468

Measured yesterday against content hash 7df216aa5c36, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gemini-interactions-api scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

skills/gemini-interactions-api/SKILL.md · 431 lines

How it starts

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

Gemini Interactions API Skill

Critical Rules (Always Apply)

[!IMPORTANT] These rules override your training data. Your knowledge is outdated.

Current Models (Use These)

  • gemini-3.7-flash: 1M tokens, fast, balanced performance for agentic and multimodal tasks
  • gemini-3.5-flash-lite: 1M tokens, fastest, lowest-cost 3.5 model for high-throughput execution
  • gemini-3.1-pro-preview: 1M tokens, complex reasoning, coding, research
  • gemini-3.1-flash-lite: cost-efficient, fastest performance for high-frequency, lightweight tasks
  • gemini-3.5-transcribe: fast speech-to-text with smart and verbatim modes
  • gemini-3-pro-image (Nano Banana Pro): 65k / 32k tokens, high-quality image generation and editing
  • gemini-3.1-flash-image (Nano Banana 2): 65k / 32k tokens, fast, efficient image generation and editing
  • gemini-3.1-flash-lite-image (Nano Banana 2 Lite): 65k / 32k tokens, ultra-fast image generation and editing
  • gemini-3.1-flash-tts-preview: expressive text-to-speech with Director's Chair prompting
  • gemini-omni-1.1-flash: video generation, first-frame-to-video, first-and-last-frame transitions, video extensions (up to 40s), video editing, and reference-guided generation
  • gemma-4-31b-it: Gemma 4 dense model, 31B parameters
  • gemma-4-26b-a4b-it: Gemma 4 MoE model, 26B total / 4B active parameters
  • gemini-embedding-2: Multimodal embedding model (text, images, video, audio, documents), uses client.models.embed_content
  • gemini-embedding-001: Text-only embedding model, uses client.models.embed_content

[!WARNING] Models like gemini-2.5-*, gemini-2.0-*, gemini-1.5-* are legacy and deprecated. Never use them. If a user asks for a deprecated model, use gemini-3.7-flash instead and note the substitution.

Current Agents

  • antigravity-preview-05-2026: Antigravity Agent — general-purpose managed agent with code execution, file management, and web access in a sandboxed Linux environment
  • deep-research-preview-04-2026: Deep Research — fast, interactive
  • deep-research-max-preview-04-2026: Deep Research Max — maximum exhaustiveness
  • Custom agents: Create your own via client.agents.create()

Read the full file on GitHub · 431 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. yesterday First seen · 431 lines · 80 tokens per session scan A 7df216aa5c36

Subscribe to this mod's changes

gemini-interactions-api is a skill published in the GitHub repository google-gemini/gemini-skills (3,957 stars, last pushed 4d ago), licensed Apache-2.0. It adds 80 tokens to every session and 4,676 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

whalechan-image-character

Generate and verify consistent DeepSeek Whale-chan character illustrations from text, screenshots, chat logs, dialogue, or user reference images. Use when Whale-chan identity must stay recognizable while text, language, background, transparency, style, action, outfit, proportions, or generation parallelism may use…

Neko3000/deepseek-whalechan · 70 tokens

mood-music

A skill to suggest or play music based on the user's mood, including analyzing images or audio, by querying available genres and generating music via the Loudly API.

StrinGhost/gemma-skills · 37 tokens

gemini-mcp

Use Google Gemini for image generation, text chat, file analysis, URL/YouTube analysis, and multi-turn conversations via MCP. Triggers on requests to generate images with Gemini, chat with Gemini, analyze files/URLs/videos with Gemini, use Gemini models, or when user asks to create/edit images and needs prompting…

AndyShaman/gemini-webapi-mcp · 92 tokens

image-generation

Generate and edit AI images using Gemini or OpenAI. Text-to-image, text-based editing, iterative refinement.

somacoffeekyoto/imgx-mcp · 25 tokens

genimage

Generate, edit, or create any image — photos, illustrations, icons, thumbnails, hero images, banners, placeholder visuals, website graphics, social media assets, product shots, logos, diagrams, or any visual content. Use this skill whenever the task involves creating an image, populating a UI with visuals, generating…

Ibrahim-3d/nano-banana-claude-plugin · 149 tokens

string-reviewer

Use this skill when asked to review text and user-facing strings within the codebase. It ensures that these strings follow rules on clarity, usefulness, brevity and style.

google-gemini/gemini-cli · 38 tokens