API 버전 설명

API 버전 설명

이 문서는 Gemini API의 v1 버전과 v1beta 버전의 차이점에 대한 개괄적 개요를 제공해요.

  • v1: API의 안정 버전이에요. 안정 버전의 기능은 메이저 버전 수명 동안 완전히 지원돼요. 호환성이 깨지는 변경이 있다면 새로운 메이저 버전의 API가 만들어지고 기존 버전은 합리적인 기간 후 폐기돼요. 호환성이 깨지지 않는 변경은 메이저 버전을 유지하면서 도입될 수 있어요. Interactions API와 그 핵심 기능은 v1에서 일반 공급(GA) 상태예요.
  • v1beta: 이 버전에는 활발히 개발 중인 초기 기능과 성능이 포함돼요. v1beta의 기능은 피드백에 따라 다듬으면서 변경될 수 있지만, 안정 버전으로 승격되기 전에 새로운 기능을 시험해 볼 수 있게 해줘요.

출처: 원문

본문

기능 및 성능 지원

다음 표는 v1(GA)과 v1beta(베타) 전반의 기능 가용성을 자세히 보여줘요. 핵심 API 기능과 도구는 명시되지 않는 한 Interactions API와 generateContent 모두에 적용돼요.

기능 v1 v1beta
핵심 API 기능 ✅ ✅
Interactions API ✅ ✅
함수 호출 ✅ ✅
구조화된 출력 ✅ ✅
Thinking / 추론 ✅ ✅
시스템 지침 ✅ ✅
오디오 출력(음성 구성) ✅ ✅
서비스 계층(우선순위 / Flex) ✅ ✅
도구 ✅ ✅
코드 실행 도구 ✅ ✅
Google 검색 그라운딩 ✅ ✅
Google 지도 그라운딩 ✅ ✅
URL 컨텍스트 도구 ✅ ✅
파일 검색 도구 ✅ ✅
컴퓨터 사용 도구 ✅ ✅
MCP 서버 도구 ✅ ✅
실시간 API
Live API(WebSockets) ✅ ✅
Live Music API ✅ ✅
임시 토큰(Live API) ✅ ✅
플랫폼 API
모델 API ✅ ✅
파일 서비스 경로 ✅ ✅
파일 검색 저장소 경로 ✅ ✅
에이전트 API ✅ ✅
웹훅 API ✅ ✅
컨텍스트 캐싱 ✅ ✅

✅ = 지원됨

SDK에서 API 버전 구성

Gemini API SDK는 기본적으로 v1beta를 사용하지만, 다음 코드 샘플과 같이 API 버전을 설정하여 명시적으로 지정할 수 있어요.

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)
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();
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(""));
package main

import (
    "context"
    "fmt"
    "log"

    "google.golang.org/genai"
    "google.golang.org/genai/interactions/models/interactions"
    "google.golang.org/genai/interactions/models/operations"
)

func main() {
    ctx := context.Background()
    client, err := genai.NewClient(ctx, &genai.ClientConfig{
        HTTPOptions: genai.HTTPOptions{
            APIVersion: "v1",
        },
    })
    if err != nil {
        log.Fatal(err)
    }

    res, err := client.Interactions.Create(ctx, operations.CreateInteractionRequest{
        Body: operations.NewCreateInteractionRequestBody(interactions.CreateModelInteraction{
            Model: interactions.Model("gemini-3.6-flash"),
            Input: interactions.NewInteractionsInput("Explain how AI works"),
        }),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Interaction.OutputText != nil {
        fmt.Println(*res.Interaction.OutputText)
    }
}
curl -X POST "https://generativelanguage.googleapis.com/v1/interactions" \
  -H "x-goog-api-key: *** \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-3.8-flash",
    "input": "Explain how AI works",
  }'

더 알아보기 (Learn more)