Skip to content

Gemini Interactions API Guide

Teaches an agent to build Gemini Interactions API calls for multi-turn, streaming, and agent tasks on Google Cloud

Repository
google/skills
Stars
21,782
Licence
Apache-2.0
Files
4 files

What it does

Once installed, the agent knows how to authenticate to Google Cloud, set up the Google Gen AI SDK, and call Gemini's Interactions API, which stores conversation state on Google's servers so follow-up messages can refer back to earlier turns. It also covers background tasks, streaming, structured output, and function calling, and warns about outdated SDKs and deprecated model names. The files shown are a SKILL.md guide plus reference documents on the REST API and data model.

Great for

  • Developers building chatbots or multi-turn assistants on Google Cloud
  • Engineers who want to run long background research tasks through Gemini
  • Teams migrating from legacy Google AI SDKs to the current Gen AI SDK

Skip it if

  • Non-developers who just want to chat with Gemini (no install needed; this is for writing code)
  • Projects that must keep data off server-side storage: the skill notes interactions are stored by default for 7 days unless store=False is set
  • Anyone needing guaranteed-current model names: the skill hardcodes model IDs that may change, so verify them against the linked docs

Try asking

  • “Write a Python script that keeps a multi-turn conversation going with Gemini using the Interactions API”
  • “Set up Gemini client initialization with Application Default Credentials for my Google Cloud project”
  • “Start a background deep-research task with Gemini and stream the results”
Step-by-step guide: how to use Gemini Interactions API GuideInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the Apache-2.0 licence and an attribution note.

    gemini-interactions-api.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip gemini-interactions-api.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip gemini-interactions-api.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the agent your project ID and preferred language so it writes ready-to-run code instead of placeholders
  • Keep API keys out of generated code; prefer environment variables and ADC as the skill recommends
  • Check the referenced model documentation before production use, since model names change quickly

What's inside

  • references/attribution.md
  • references/data_model.md
  • references/rest_api.md
  • SKILL.md

Redistributed unmodified from google/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.