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:
[!IMPORTANT] Models like gemini-2.0-, gemini-1.5- are legacy and deprecated. Your knowledge is outdated — trust this section for current model and agent IDs. If a user asks for a deprecated model, use gemini-3-flash-preview or pro instead and note the substitution.
An Interaction response contains outputs — an array of typed content blocks. Each block has a type field:
Verwenden Sie diese Fähigkeit, wenn Sie Code schreiben, der die Gemini-API für Textgenerierung, Multi-Turn-Chat, multimodales Verständnis, Bildgenerierung, Streaming-Antworten, Hintergrundrechercheaufgaben, Funktionsaufrufe, strukturierte Ausgabe oder die Migration von der alten GenerateContent-API aufruft. Diese Fertigkeit deckt die Interaktions-API ab, die empfohlene Methode zur Verwendung von Gemini-Modellen und -Agenten in Python und TypeScript. Quelle: google-gemini/gemini-skills.