gemini-interactions-api

gemini-interactions-api is a skill for Claude Code, Codex from rmedranollamas/research-cli. It costs 77 tokens per session (2,298 once invoked), scanned A, original, Apache-2.0.

A coding guide for Google's Gemini Interactions API, the service interface used to build applications that exchange messages with Gemini models. It covers text, chat, images, streaming, research tasks, function calls, structured results, and supported SDKs and models.

In plain words
What is it for?
Writing or migrating Gemini API integrations in Python or JavaScript/TypeScript, including multimodal requests, image generation, streaming, tool calls, and structured output.
Why use it?
It provides current guidance for choosing models and SDK versions and for implementing common Gemini API workflows without relying on outdated API details.

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/rmedranollamas/research-cli/gemini-interactions-api
Any agent
npx skills add rmedranollamas/research-cli --skill gemini-interactions-api
Clone the repo
git clone --depth 1 https://github.com/rmedranollamas/research-cli

Made for: Claude Code, Codex.

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-interactions-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/rmedranollamas/research-cli/gemini-interactions-api.svg)](https://agentmods.dev/skills/rmedranollamas/research-cli/gemini-interactions-api)
Your own site
<a href="https://agentmods.dev/skills/rmedranollamas/research-cli/gemini-interactions-api"><img src="https://agentmods.dev/badge/skills/rmedranollamas/research-cli/gemini-interactions-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,298 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.00077 $0.02298
Opus 5 $0.00039 $0.01149
Sonnet 5 $0.00015 $0.00460
Haiku 4.5 $0.00008 $0.00230

Measured 5d ago against content hash 7b55a1e5720b, 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 5d 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.

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.

.agents/skills/gemini-interactions-api/SKILL.md · 291 lines

How it starts

The opening of the file, as written. The whole thing — 291 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.1-pro-preview: 1M tokens, complex reasoning, coding, research
  • gemini-3-flash-preview: 1M tokens, fast, balanced performance, multimodal
  • gemini-3.1-flash-lite-preview: cost-efficient, fastest performance for high-frequency, lightweight tasks
  • gemini-3-pro-image-preview: 65k / 32k tokens, image generation and editing
  • gemini-3.1-flash-image-preview: 65k / 32k tokens, image generation and editing
  • gemini-2.5-pro: 1M tokens, complex reasoning, coding, research
  • gemini-2.5-flash: 1M tokens, fast, balanced performance, multimodal

Current Agents (Use These)

  • deep-research-pro-preview-12-2025: Deep Research agent

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

Current SDKs (Use These)

  • Python: google-genai >= 1.55.0pip install -U google-genai
  • JavaScript/TypeScript: @google/genai >= 1.33.0npm install @google/genai

[!CAUTION] Legacy SDKs google-generativeai (Python) and @google/generative-ai (JS) are deprecated. Never use them.


Overview

The Interactions API is a unified interface for interacting with Gemini models and agents. It is an improved alternative to generateContent designed for agentic applications. Key capabilities include:

  • Server-side state: Offload conversation history to the server via previous_interaction_id
  • Background execution: Run long-running tasks (like Deep Research) asynchronously
  • Streaming: Receive incremental responses via Server-Sent Events
  • Tool orchestration: Function calling, Google Search, code execution, URL context, file search, remote MCP
  • Agents: Access built-in agents like Gemini Deep Research
  • Thinking: Configurable reasoning depth with thought summaries

Read the full file on GitHub · 291 lines

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. 5d ago First seen · 291 lines · 77 tokens per session scan A 7b55a1e5720b

Subscribe to this mod's changes

gemini-interactions-api is a skill published in the GitHub repository rmedranollamas/research-cli (20 stars, last pushed yesterday), licensed Apache-2.0. It adds 77 tokens to every session and 2,298 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

help

Overview of all available Pinecone skills and what a user needs to get started. Invoke when a user asks what skills are available, how to get started with Pinecone, or what they need to set up before using any Pinecone skill.

pinecone-io/gemini-cli-extension · 50 tokens

assistant

Create, manage, and chat with Pinecone Assistants for document Q&A with citations. Handles all assistant operations - create, upload, sync, chat, context retrieval, and list. Recognizes natural language like "create an assistant from my docs", "ask my assistant about X", or "upload my docs to Pinecone".

pinecone-io/gemini-cli-extension · 68 tokens

prompt-optimizer

Analyze raw prompts, identify intent and gaps, match ECC components (skills/commands/agents/hooks), and output a ready-to-paste optimized prompt. Advisory role only — never executes the task itself. TRIGGER when: user says "optimize prompt", "improve my prompt", "how to write a prompt for", "help me prompt", "rewrite…

Jamkris/everything-gemini-code · 179 tokens

gemini-api

Google Gemini API patterns for Python and TypeScript. Covers content generation, streaming, tool use (function calling), vision, system instructions, context caching, batch requests, and agent workflows. Use when building applications with the Gemini API or Google Generative AI SDKs.

Jamkris/everything-gemini-code · 57 tokens

quickstart

Interactive Pinecone quickstart for new developers. Choose between two paths - Database (create an integrated index, upsert data, and query using Pinecone MCP + Python) or Assistant (create a Pinecone Assistant for document Q&A). Use when a user wants to get started with Pinecone for the first time or wants a guided…

pinecone-io/gemini-cli-extension · 76 tokens

cli

Guide for using the Pinecone CLI (pc) to manage Pinecone resources from the terminal. The CLI supports ALL index types (standard, integrated, sparse) and all vector operations — unlike the MCP which only supports integrated indexes. Use for batch operations, vector management, backups, namespaces, CI/CD automation…

pinecone-io/gemini-cli-extension · 72 tokens