{"slug": "gemini-interactions-api", "title": "Gemini Interactions API", "summary": "Google launched the Gemini Interactions API as a generally available interface for building with Gemini models and agents, offering server-side conversation state, lower costs, and support for frontier models and agentic applications. The API is now the recommended interface for new projects, while the legacy generateContent API remains supported.", "body_md": "The Interactions API is our new interface and the most straightforward way to build with Gemini models and agents. As of June 2026, it is Generally Available and the recommended interface for all new projects.\n\nWhile it is now considered legacy, the original\n[ generateContent](/gemini-api/docs/generate-content/text-generation) API\nremains fully supported.\n\n## Why use the Interactions API?\n\n**New capabilities out of the box**: Optional server-side conversation state using`previous_interaction_id`\n\n, observable execution steps for debugging and UI rendering, and[background execution](/gemini-api/docs/background-execution)for long-running tasks using`background=true`\n\n.**Lower cost with higher cache hit rates**: Server-side state management enables more efficient context caching across turns, reducing token costs for multi-turn conversations.**Built for frontier models and agents**: Purpose-built for thinking models, multi-step tool use, and complex reasoning flows — simplifying the process of building, debugging, and orchestrating agentic applications.**Single API for models and agents**: One unified interface for calling Gemini models and agents directly such as Deep Research and custom managed agents — no separate endpoints or patterns to learn.**Where new things launch**: Going forward, new models and capabilities beyond the core mainline family, along with new agentic capabilities and tools, will launch on the Interactions API.\n\nBy default, the Interactions API stores requests so you can leverage\nthe server-side state management features by using\n`previous_interaction_id`\n\n. You can opt into stateless behavior by setting\n`store=false`\n\n. See the [data retention](#data-storage-retention) section for\ndetails.\n\n## Get started\n\n**Set up your coding agent**: Connect to the** Gemini Docs MCP**and install the`gemini-interactions-api`\n\nskill to give your assistant direct access to the latest developer docs and best practices.[Set up your coding agent →](/gemini-api/docs/coding-agents)**Migrate from**: If you have an existing integration, follow the`generateContent`\n\n[Migration Guide](/gemini-api/docs/migrate-to-interactions)to transition to the Interactions API.**Get started**: Get started in the[Interactions API Get started guide](/gemini-api/docs/get-started).\n\n### Feature Guides\n\nExplore the specific capabilities of the Interactions API through these guides. You can use the toggle on these pages to switch between generateContent and Interactions API:\n\n[Text generation](/gemini-api/docs/text-generation)[Image generation](/gemini-api/docs/image-generation)[Image understanding](/gemini-api/docs/image-understanding)[Audio understanding](/gemini-api/docs/audio)[Video understanding](/gemini-api/docs/video-understanding)[Document processing](/gemini-api/docs/document-processing)[Function calling](/gemini-api/docs/function-calling)[Structured output](/gemini-api/docs/structured-output)[Deep Research Agent](/gemini-api/docs/deep-research)[Flex inference](/gemini-api/docs/flex-inference)[Priority inference](/gemini-api/docs/priority-inference)\n\n## How the Interactions API works\n\nThe Interactions API centers around a core resource: the . An\n\n`Interaction`\n\n`Interaction`\n\nrepresents a complete turn in a conversation or task. It acts as a session record, containing the entire history of an interaction as a chronological sequence of **execution steps**. These steps include model thoughts, server-side or client-side tool calls and results (like\n\n`function_call`\n\nand `function_result`\n\n), and the final `model_output`\n\n. The stored resource (retrieved via `interactions.get`\n\n) also includes `user_input`\n\nsteps for full context, though the `interactions.create`\n\nresponse only returns model-generated steps.When you make a call to\n[ interactions.create](/api/interactions-api#CreateInteraction), you are\ncreating a new\n\n`Interaction`\n\nresource.### Server-side state management\n\nYou can use the `id`\n\nof a completed interaction in a subsequent call using the\n`previous_interaction_id`\n\nparameter to continue the conversation. The server\nuses this ID to retrieve the conversation history, saving you from having to\nresend the entire chat history.\n\nThe `previous_interaction_id`\n\nparameter preserves only the conversation history (inputs and outputs)\nusing `previous_interaction_id`\n\n. The other parameters are **interaction-scoped**\nand apply only to the specific interaction you are currently generating:\n\n`tools`\n\n`system_instruction`\n\n`generation_config`\n\n(including`thinking_level`\n\n,`temperature`\n\n, etc.)\n\nThis means you must re-specify these parameters in each new interaction if you want them to apply. This server-side state management is optional; you can also operate in stateless mode by sending the full conversation history in each request.\n\n### Data storage and retention\n\nBy default, the API stores all Interaction objects (`store=true`\n\n) in order to\nsimplify use of server-side state management features (with\n`previous_interaction_id`\n\n), [background execution](/gemini-api/docs/background-execution) (using `background=true`\n\n) and\nobservability purposes.\n\n**Paid Tier**: The system retains interactions for** 55 days**.** Free Tier**: The system retains interactions for** 1 day**.\n\nIf you don't want this, you can\nset `store=false`\n\nin your request. This control is separate from state\nmanagement; you can opt out of storage for any interaction. However, note that\n`store=false`\n\nis incompatible with [background execution](/gemini-api/docs/background-execution) and prevents using\n`previous_interaction_id`\n\nfor subsequent turns.\n\nYou can delete stored interactions at any time using the delete method found in\nthe [API Reference](/api/interactions-api). You can only delete interactions if\nyou know the interaction ID.\n\nAfter the retention period expires, your data will be deleted automatically.\n\nThe system processes Interaction objects according to the [terms](/gemini-api/terms).\n\n## Best practices\n\n**Cache hit rate**: Using`previous_interaction_id`\n\nto continue conversations allows the system to more easily utilize implicit caching for the conversation history, which improves performance and reduces costs.**Mixing interactions**: You have the flexibility to mix and match Agent and Model interactions within a conversation. For example, you can use a specialized agent, like the Deep Research agent, for initial data collection, and then use a standard Gemini model for follow-up tasks such as summarizing or reformatting, linking these steps with the`previous_interaction_id`\n\n.\n\n## Supported models & agents\n\n| Model Name | Type | Model ID |\n|---|---|---|\n| Gemini 3.5 Flash | Model | `gemini-3.5-flash` |\n| Gemini 3.1 Pro Preview | Model | `gemini-3.1-pro-preview` |\n| Gemini 3.1 Flash-Lite | Model | `gemini-3.1-flash-lite` |\n| Gemini 3 Flash Preview | Model | `gemini-3-flash-preview` |\n| Gemini 2.5 Pro | Model | `gemini-2.5-pro` |\n| Gemini 2.5 Flash | Model | `gemini-2.5-flash` |\n| Gemini 2.5 Flash-lite | Model | `gemini-2.5-flash-lite` |\n| Gemini 3 Pro Image | Model | `gemini-3-pro-image` |\n| Gemini 3.1 Flash Image | Model | `gemini-3.1-flash-image` |\n| Gemini 3.1 Flash TTS Preview | Model | `gemini-3.1-flash-tts-preview` |\n| Gemma 4 31B IT | Model | `gemma-4-31b-it` |\n| Gemma 4 26B MoE IT | Model | `gemma-4-26b-a4b-it` |\n| Lyria 3 Clip Preview | Model | `lyria-3-clip-preview` |\n| Lyria 3 Pro Preview | Model | `lyria-3-pro-preview` |\n| Deep Research Preview | Agent | `deep-research-preview-04-2026` |\n| Deep Research Preview | Agent | `deep-research-max-preview-04-2026` |\n| Antigravity Preview | Agent | `antigravity-preview-05-2026` |\n\n## SDKs\n\nYou can use latest version of the Google GenAI SDKs in order to access Interactions API.\n\n- On Python, this is\n`google-genai`\n\npackage from`2.3.0`\n\nversion onwards. - On JavaScript, this is\n`@google/genai`\n\npackage from`2.3.0`\n\nversion onwards.\n\nYou can learn more about how to install the SDKs on\n[Libraries](/gemini-api/docs/libraries) page.\n\n## Limitations\n\n**Remote MCP**: Gemini 3 does not support remote MCP, this is coming soon.\n\nThe following features are supported by the\n[ generateContent](/gemini-api/docs/generate-content/text-generation) API but are\n\n**not yet available** in the Interactions API:\n\n: The[Video metadata](/gemini-api/docs/video-understanding)`video_metadata`\n\nfield, used to set clipping intervals and custom frame rates for video understanding.[Batch API](/gemini-api/docs/batch-api)[Automatic function calling (Python)](https://ai.google.dev/gemini-api/docs/function-calling?example=meeting#automatic_function_calling_python_only): Note that server-side implicit caching is available in the Interactions API via[Explicit caching](/gemini-api/docs/caching)`previous_interaction_id`\n\n.\n\n## Feedback\n\nYour feedback is critical to the development of the Interactions API.\nShare your thoughts, report bugs, or request features on our\n[Google AI Developer Community Forum](https://discuss.ai.google.dev/c/gemini-api/4).\n\n## What's next\n\n- Try the\n[Interactions API quickstart notebook](https://colab.sandbox.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_interactions_api.ipynb). - Learn more about the\n[Gemini Deep Research Agent](/gemini-api/docs/deep-research).", "url": "https://wpnews.pro/news/gemini-interactions-api", "canonical_source": "https://ai.google.dev/gemini-api/docs/interactions-overview", "published_at": "2026-07-07 12:40:58+00:00", "updated_at": "2026-07-07 13:00:10.943599+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-products", "ai-tools", "ai-infrastructure"], "entities": ["Google", "Gemini", "Interactions API", "generateContent API", "Deep Research"], "alternates": {"html": "https://wpnews.pro/news/gemini-interactions-api", "markdown": "https://wpnews.pro/news/gemini-interactions-api.md", "text": "https://wpnews.pro/news/gemini-interactions-api.txt", "jsonld": "https://wpnews.pro/news/gemini-interactions-api.jsonld"}}