Community研究與資料分析github.com

google-gemini/gemini-interactions-api

當撰寫呼叫 Gemini API 進行文字生成、多輪對話、多模態理解、圖像生成、串流回應、背景研究任務、函式呼叫、結構化輸出,或從舊版 generateContent API 遷移時,使用此技能。此技能涵蓋 Interactions API,這是使用 Gemini 模型與代理的推薦方式,支援 Python 和 TypeScript。

gemini-interactions-api 是什麼?

此技能專為使用 Gemini API 的開發者設計,特別是從舊版 generateContent API 遷移或採用新的 Interactions API 的場景。它涵蓋了文字生成、多輪對話、多模態理解(包括圖像與影片)、圖像生成、串流回應、背景研究任務、函式呼叫以及結構化輸出。Interactions API 是與 Gemini 模型和代理互動的推薦方法,支援 Python 和 TypeScript 程式語言。此項技能不僅提供程式碼範例,還解釋了如何設定 API 金鑰、管理的內容類型(如使用者與模型訊息),以及如何利用 Google 搜尋作為工具來提升回應品質。透過這項技能,開發者可以順利使用 Gemini 2.0 系列模型(包括 Gemini 2.0 Flash、Gemini 2.0 Flash-Lite 等)來建構從簡單問答到複雜研究任務的應用,並確保程式碼與最新的 API 最佳實務保持一致。

相容平台~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/google-gemini/gemini-skills/tree/main/skills/gemini-interactions-api

Installed? Explore more 研究與資料分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

gemini-interactions-api 是做什麼的?

當撰寫呼叫 Gemini API 進行文字生成、多輪對話、多模態理解、圖像生成、串流回應、背景研究任務、函式呼叫、結構化輸出,或從舊版 generateContent API 遷移時,使用此技能。此技能涵蓋 Interactions API,這是使用 Gemini 模型與代理的推薦方式,支援 Python 和 TypeScript。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

google-gemini/gemini-api-dev

Use this skill when building applications with Gemini API hosted models, including Gemini and Gemma 4, working with multimodal content (text, images, audio, video), implementing function calling, using structured outputs, or needing current model specifications. Covers SDK usage (google-genai for Python, @google/genai for JavaScript/TypeScript, com.google.genai:google-genai for Java, google.golang.org/genai for Go), model selection, and API capabilities.

google-gemini/gemini-live-api-dev

Use this skill when building real-time, bidirectional streaming applications with the Gemini Live API. Covers WebSocket-based audio/video/text streaming, voice activity detection (VAD), native audio features, function calling, session management, ephemeral tokens for client-side auth, live translation, and all Live API configuration options. SDKs covered - google-genai (Python), @google/genai (JavaScript/TypeScript).

google-gemini/gemini-skills

Use this skill for generative video editing, text-to-video, image-referenced video generation, first-frame-to-video, first-and-last-frame transitions, and video extensions using Gemini Omni 1.1 Flash (gemini-omni-1.1-flash) via the official google-genai SDK. Includes workflows for pre-processing/optimizing high-resolution or long source videos with ffmpeg, stripping audio for full sound regeneration, and handling turn-by-turn video editing and parallel execution.

google-gemini/vertex-ai-api-dev

Guides the usage of Gemini API on Google Cloud Vertex AI with the Gen AI SDK. Use when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.

相關技能