이 문서에서는 Gemini API의 v1 버전과 v1beta 버전의 차이점을 간략하게 설명합니다.
- v1: 안정적인 API 버전입니다. 안정화 버전의 기능은 메이저 버전의 수명 주기 동안 완전히 지원됩니다. 브레이킹 체인지가 있는 경우 API의 새 메이저 버전이 생성되고 기존 버전은 적절한 기간이 지난 후 지원 중단됩니다.
브레이킹 체인지가 아닌 변경사항은 메이저 버전을 변경하지 않고 API에 도입될 수 있습니다. Interactions API와 핵심 기능은
v1에서 일반적으로 사용할 수 있습니다. - v1beta: 이 버전에는 적극적으로 개발 중인 초기 기능이 포함되어 있습니다.
v1beta의 기능은 의견을 바탕으로 개선되면서 변경될 수 있지만, 안정 버전으로 승격되기 전에 새로운 기능을 사용해 볼 수 있습니다.
기능 및 특성 지원
다음 표에는 v1 (정식 버전) 및 v1beta (베타)에서 사용할 수 있는 기능이 자세히 설명되어 있습니다. 핵심 API 기능과 도구는 달리 명시되지 않는 한 Interactions API와 generateContent 모두에 적용됩니다.
- - 지원됨
SDK에서 API 버전 구성
Gemini API SDK는 기본적으로 v1beta로 설정되지만 다음 코드 샘플과 같이 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)
자바스크립트
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(""));
Go
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)
}
}
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",
}'