All posts
AI & Machine Learning

Google replaces Gemini's generateContent with Interactions API

Huma Shazia22 June 2026 at 11:46 pm4 min read

Key Takeaways

  • Interactions API replaces generateContent as the default Gemini interface, with new agent features exclusive to the new API
  • Developers can choose Flex mode for 50% cost savings or Priority mode for speed optimization
  • New capabilities include Managed Agents with Linux sandboxes, background execution, and tool chaining with Google Search and Maps

Google DeepMind has made the Interactions API the default interface for Gemini models and agents, retiring the generateContent API that developers have used since Gemini's launch. The change, announced June 22, 2026, means all new agent features will ship exclusively through Interactions. The old API still works, but it's now legacy.

The Interactions API has been in beta since December 2025. Now generally available, it replaces generateContent across Google AI Studio and all official documentation. Google has published a migration guide for developers making the switch.

"Interactions sets the stage for the new era of Agents," Google's developer relations lead Logan Kilpatrick wrote. That framing tells you where Google sees this heading: away from stateless text generation, toward persistent agents that execute multi-step tasks.

What's new in the Interactions API?

The feature list explains why Google made this the default rather than keeping both APIs at parity. Managed Agents now get their own Linux sandbox, meaning they can run code, install packages, and manipulate files in an isolated environment. Background execution lets agents work on long-running tasks without holding a connection open. Tool chaining connects agents directly to Google Search and Maps.

Media generation is also baked in. Agents can now produce images, music, and speech through the same interface that handles text, which simplifies builds that need multimodal output.

Google simplified the API schema since beta. The old role structure, where you labeled messages as "user" and "model", is gone. Typed steps replace it. Every action, from user input to function calls to model responses, is now its own defined step object. This makes it easier to inspect and debug complex agent workflows where a single interaction might involve multiple tool calls.

Flex vs Priority: picking your cost-speed tradeoff

Developers now choose between two execution modes. Flex mode cuts costs by 50 percent. Priority mode optimizes for speed. Google hasn't published exact latency benchmarks, but the tradeoff is straightforward: if your agent handles background tasks where an extra second doesn't matter, Flex saves money. Customer-facing interactions where users wait for responses need Priority.

This pricing structure mirrors what we've seen from other major model providers. OpenAI introduced similar tiered pricing for batch versus synchronous requests. The pattern makes sense: GPU utilization is more efficient when you can batch and schedule work flexibly.

What happens to existing generateContent code?

Your existing code won't break. Google explicitly states the old API still works. But you're now on a deprecation path. New features, particularly the agent capabilities that define where Google is taking Gemini, won't come to generateContent.

The migration isn't trivial. Switching from role-based messages to typed steps requires restructuring how you build requests. The semantic shift matters too. generateContent implied a single call-response pattern. Interactions assumes multi-turn, multi-tool workflows as the default case.

For simple text generation, the migration is busywork. For teams building agents, the new primitives, sandboxes, background execution, tool chaining, are worth the refactor.

The broader shift to agentic interfaces

Google's move fits a clear industry pattern. OpenAI has pushed hard on Assistants API and function calling. Anthropic built Claude around tool use and computer interaction. The LLM-as-chat-completion model is giving way to LLM-as-agent-orchestrator.

This matters for how developers think about these systems. Chat completions are stateless and predictable. Agent interactions are stateful, potentially long-running, and can take real-world actions. The API design reflects that shift. Typed steps give you an audit trail. Sandboxes give you isolation. Background execution acknowledges that some tasks take minutes, not milliseconds.

ℹ️

Logicity's Take

Google is betting that the future of AI interfaces is agents, not chat. By making Interactions the default and gate-keeping new features behind it, they're pushing developers to adopt the agentic model whether they need it today or not. The 50% Flex discount is a smart onramp, but the real lock-in comes from Managed Agents and tool chaining. Once you're running code in Google's sandboxes and querying their Search API natively, switching providers gets expensive.

Frequently Asked Questions

Do I have to migrate from generateContent to Interactions API?

Not immediately. The old API still works. But new agent features will only ship to Interactions, so migration is necessary if you want access to Managed Agents, tool chaining, or background execution.

How much does Flex mode save compared to Priority?

Flex mode cuts costs by 50 percent compared to Priority mode. It trades speed for lower pricing, making it suitable for background tasks and batch processing.

What are typed steps in the Interactions API?

Typed steps replace the old role-based message structure. Every action, including user input, model responses, and function calls, is now a defined step object rather than a labeled message.

What tools can Gemini agents access through the Interactions API?

The API includes native tool chaining with Google Search and Maps, plus media generation for images, music, and speech. Managed Agents can also run code in isolated Linux sandboxes.

Also Read
3 free tools that double NotebookLM's usefulness

Practical tips for getting more from Google's AI tools

ℹ️

Need Help Implementing This?

If your team is evaluating the Interactions API migration or building Gemini agents, Logicity can connect you with implementation partners. Contact us at consulting@logicity.in.

Source: The Decoder / Matthias Bastian

H

Huma Shazia

Senior AI & Tech Writer