APIYI gateway status (tested July 4, 2026 (UTC+8)): the Interactions API is not yet supported through the gateway — both
/v1beta2/interactions and /v1beta/interactions return 404. When calling Gemini via APIYI, keep using the generateContent native format; all Gemini docs on this site are based on it. We will update this page once the gateway adds Interactions API support.What the Two Paradigms Are
generateContent is the classic stateless interface: one request carries the full context, one response returns the full result, atPOST /v1beta/models/{model}:generateContent. Google states that “while it is now considered legacy, it remains fully supported.”
The Interactions API is Google’s new interface, GA since June 2026, at POST /v1beta2/interactions. It is built around the core Interaction resource (one complete conversation turn or task), and the response is a chronological timeline of execution steps — model thoughts, tool calls and results, and the final output are all explicit steps. Google is explicit that new models beyond the core mainline family and new agentic capabilities will launch on the Interactions API going forward (source: ai.google.dev/gemini-api/docs/interactions-overview).
Core Differences at a Glance
A common pitfall with the Interactions API’s server-side state:
previous_interaction_id only carries over the conversation history. tools, system_instruction, and generation_config (including thinking_level, temperature, etc.) are interaction-scoped — you must re-send them on every turn or they silently stop applying.Request & Response Structures (single text turn)
The generateContent example works directly against the APIYI gateway; the Interactions API example targets Google’s endpoint directly (not yet supported by APIYI):Multi-turn Conversations Compared
This is where the two paradigms feel most different. generateContent requires resending the entire history every turn; the Interactions API only needs the previous turn’sid:
store semantics.
Differences for Image Models
Gemini 3 image models (such asgemini-3-pro-image) think by default, and the two paradigms present the “interim thinking drafts” completely differently:
- generateContent (APIYI’s current gateway format): interim thinking drafts come back as ordinary image parts inside
candidates[0].content.parts(withthoughtSignature, without athoughtflag). In testing a single response can contain 2–10 images, each billed at 1120/2000 tokens into the output — always iterate over parts and take the last one as the final version. Full measurements and reconciliation rules: Usage Fields & Output Explained. - Interactions API: thinking is made explicit as
type: "thought"steps (thought text and interim images), with the final image in themodel_outputstep; the SDKs also provide.output_image/.output_textconvenience properties. Interleaved text-and-image output (e.g. illustrated stories) still requires manually iterating over steps.
APIYI Gateway Compatibility Test
Probed againstapi.apiyi.com with a test key on July 4, 2026 (UTC+8):
Conclusion: the APIYI gateway does not yet forward the Interactions API, so Interactions-only capabilities — server-side continuation, agent calls, background execution — are currently unavailable through the gateway.
Recommendations
- Via APIYI: keep using generateContent. It has the most complete feature set (Batch, explicit caching, and video_metadata are in fact generateContent-only), and Google has committed to fully supporting it — there is no near-term deprecation risk.
- Multi-turn with generateContent: assemble the history client-side; see Gemini Native Format and Multi-turn Conversations.
- If you call Google directly and consider migrating to the Interactions API, watch four things:
tools/system_instruction/generation_configmust be re-sent every turn;storedefaults to on with 55-day retention on the paid tier; Batch API and explicit caching are not yet available; upgrade google-genai / @google/genai to 2.3.0+. - When the Interactions API becomes worth watching: when you need official agents (Deep Research, Antigravity),
background: truelong-running tasks, or want server-side state to cut multi-turn token costs. We will update this page as soon as APIYI adds support.
Related Docs
Gemini Native Format
The complete guide to the generateContent native format via APIYI
Gemini Response Handling
Parsing candidates, parts, and finishReason correctly
Usage Fields & Output Explained
Image-model usageMetadata semantics and measured thinking-draft behavior
Multi-turn Conversations
Implementing multi-turn chat on a stateless interface