← All news·2026-06-22·4 min read

New Gemini Default API: Agents, Background Processes & Media

Interactions API is the new default for all Gemini agents. New agent features like Linux sandbox, background tasks, and media generation are only available via Interactions API.

googlegeminiapidevelopersagents

Google DeepMind announced that Interactions API is the new default API for their Gemini models and agents. Interactions API has moved out of beta (launched in Dec 2025) and into GA (June 2026). It’s now the new default in Google AI Studio and Google’s developer docs. You can still use the generateContent API if you want to continue using it for your current projects and integrations. However, Google clearly stated that all future agent features will only be available via Interactions API. So if you’re planning to build something using Gemini’s latest features, don’t get left behind with the old API.

At a high level, Interactions API is different from generateContent API because of how it structures conversations and actions. In generateContent API, there’s a role-based conversation where each message is labeled as either ‘user’ or ‘model’. This creates a two-way flow of communication. In contrast, Interactions API uses a typed step-based conversation where each action (user input, tool call, function return, model response) is treated as a standalone step with its own type. While this may not make much of a difference for simple chats, it does simplify complex agent flows that involve multiple tools and sequential operations. With typed steps, it becomes much simpler to express and scale such agent flows.

What the new API unlocks

Interactions API unlocks powerful capabilities that go beyond what was possible before. With Linux sandboxes, agents can now access a real shell instead of just a mocked tool call. They can execute commands in a sandboxed environment. Background tasks allow agents to run long-running operations asynchronously, i.e., start a task, let the agent run for hours while you do other things, and then retrieve the results later. Native tool chains with Google Search and Maps enable agents to natively chain tools without having to integrate them externally. Media generation (images, music, and speech) can now be generated natively as part of the response payload instead of making separate API calls.

Another thing to consider is the pricing model. Interactions API offers two modes of operation — Flex and Priority. In Flex mode, you pay 50% of the normal compute price but use lower-priority hardware which is ideal for background tasks and batch processing that can tolerate higher latencies. In Priority mode, you pay the full price but get higher throughput and lower latency which is perfect for real-time agent interactions. If you have any agent tasks that need to run overnight without attending to them, you can save half the compute cost by switching to Flex mode without compromising on quality. If your agent interactions require low latency and cannot afford to wait, then Priority mode is recommended.

What I'd actually do

If you are building on Gemini today, the migration from generateContent to the Interactions API is worth doing now. Google published a migration guide in the AI Studio documentation. The two features that matter most for practical builder use — background execution for tasks that run without you babysitting them, and managed agents with real shell access — simply do not exist in the old API. If those are on your roadmap, the new API is the only path. And check the Flex versus Priority pricing split before you deploy: for anything running in batch, the cost difference is real.

Source: the-decoder.com

Free course

Stop reading about AI — start building with it

The free Claude Code course: your first site, tool or game — no coding. No upsells, no cross-sells — nothing to buy here.

Start free →
EAEvgenii Arsentev

Author

Evgenii Arsentev

PhD · Founder & CEO, Dad4Kids