The Interactions API extends the core features of generateContent with the features required for modern agent applications, including:
- Optional server-side mode: The ability to transfer history management to the server. This simplifies your client code, minimizes context management errors, and can result in reduced costs via increased chance of cache hits.
- Interpretable and composable data model: A clean scheme designed for complex agent stories. You can debug, manipulate, stream and reason over interleaved messages, thinking, tools and their results.
- Execution in the background: The ability to offload long-running inference loops to the server without maintaining client-side connections.
- MCP tool remote support: Models can directly call Model Context Protocol (MCP) servers as tools.
Our motives for a new API
Models become systems and in time may even become agents themselves. When we designed generContent, the primary use case was stateless request-response text generation. This works perfectly for chatbots and completion tasks.
Since then, the landscape has changed. With the arrival of new model features like “thinking” and advanced tooling, we heard lots of feedback around providing a native interface designed to support these complex interaction patterns. As we expand the Gemini ecosystem from models to fully managed agents like Gemini Deep Research, trying to force these capabilities into genereContent would have resulted in an overly complex and fragile API.
While the Interactions API supports most content generation features and offers a more robust developer experience, it is currently in public beta and is therefore still subject to breaking changes. For standard production workloads, generateContent remains the primary path and will continue to be developed and maintained.
Get started
You can start building with the Interactions API public beta today using your Gemini API key from Google AI Studio following the API documentation. You can also check the OpenAPI specification here.
We want to make sure this API solves the real friction points you face when moving agents to production, while still allowing you to seamlessly create new lightweight experiences, so we encourage you to test it and share your feedback.
We’re committed to bringing these capabilities to the wider open source ecosystem so you can use them with your favorite tools. As a first step, the Agent Development Kit (ADK) and Agent2Agent (A2A) protocols now support the Interactions API. You can expect broader support across other tools in the coming months. Interactions API and Gemini Deep Research coming soon to Vertex AI.
