SPB Git

Repository Public

api-versions.md 5.6 KB

This document provides a high-level overview of the differences between the v1 and v1beta versions of the Gemini API.

  • v1 : Stable version of the API. Features in the stable version are fully supported over the lifetime of the major version. If there are any breaking changes, a new major version of the API will be created and the existing version will be deprecated after a reasonable period of time. Non-breaking changes may be introduced to the API without changing the major version. The Interactions API and its core features are generally available in v1.
  • v1beta : This version includes early features and capabilities that are actively being developed. While features in v1beta may be subject to changes as we refine them based on feedback, it lets you try new capabilities before they are promoted to stable.

# Capability and feature support

The following table details the availability of capabilities across v1 (GA) and v1beta (Beta). Core API capabilities and tools apply to both the Interactions API and generateContent unless specified otherwise:

[!NOTE] Note: All models are supported in both v1 and v1beta. This table tracks the availability of features across the v1 and v1beta API versions (endpoint routes and schema parameters).

Feature v1 v1beta
Core API capabilities
Interactions API Yes Yes
Function Calling Yes Yes
Structured Output Yes Yes
Thinking / Reasoning Yes Yes
System Instructions Yes Yes
Audio Output (Speech Config) Yes
Service Tier (Priority / Flex) Yes
Tools
Code Execution Tool Yes Yes
Google Search Grounding Yes Yes
Google Maps Grounding Yes Yes
URL Context Tool Yes Yes
File Search Tool Yes Yes
Computer Use Tool Yes
MCP Servers Tool Yes
Realtime APIs
Live API (WebSockets) Yes
Live Music API Yes
Ephemeral Tokens (Live API) Yes
Platform APIs
Models API Yes Yes
Files Service Route Yes Yes
File Search Stores Route Yes Yes
Agents API Yes
Webhooks API Yes
Context Caching Yes
  • Yes - Supported

# Configure API version in an SDK

The Gemini API SDKs default to v1beta, but you can explicitly specify versions by setting the API version as shown in the following code sample:

[!NOTE] Note: The GenAI SDKs use `v1beta` by default to enable access to preview features. You can configure the SDK to use the stable `v1` version (as shown below) which also supports the Interactions API.

# Python

from google import genai

client = genai.Client(http_options={'api_version': 'v1'})

interaction = client.interactions.create(
    model='gemini-3.8-flash',
    input="Explain how AI works",
)

print(interaction.output_text)

# JavaScript

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({
  httpOptions: { apiVersion: "v1" },
});

async function main() {
  const interaction = await ai.interactions.create({
    model: "gemini-3.8-flash",
    input: "Explain how AI works",
  });
  console.log(interaction.output_text);
}

await main();

# Java

import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.CreateModelInteraction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.interactions.Model;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;
import com.google.genai.types.HttpOptions;

Client client = Client.builder()
    .httpOptions(HttpOptions.builder().apiVersion("v1").build())
    .build();

CreateModelInteraction req = CreateModelInteraction.builder()
    .model(Model.of("gemini-3.6-flash"))
    .input(InteractionsInput.of("Explain how AI works"))
    .build();
var interaction = client.interactions.create(CreateInteractionRequestBody.of(req)).interaction().get();
System.out.println(interaction.outputText().orElse(""));

# REST

curl -X POST "https://generativelanguage.googleapis.com/v1/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-3.8-flash",
    "input": "Explain how AI works",
  }'
Files main
Menu

Theme