이 문서에서는 Gemini API의 v1 버전과 v1beta 버전의 차이점을 개략적으로 설명합니다.
v1: 안정적인 API 버전입니다. 안정화 버전의 기능은 주 버전의 수명 기간 동안 완전히 지원됩니다. 호환성이 깨지는 변경사항이 있는 경우 API의 다음 주요 버전이 생성되고 기존 버전은 적절한 기간이 지난 후 지원 중단됩니다.
주 버전을 변경하지 않고 API에 호환성이 깨지지 않는 변경사항이 도입될 수 있습니다.
v1beta: 이 버전에는 개발 중일 수 있으며 급격한 브레이킹 체인지가 적용될 수 있는 사전 체험판 기능이 포함되어 있습니다. 베타 버전의 기능이 안정화 버전으로 이동한다는 보장도 없습니다. 이 버전은 불안정하므로 이 버전으로 프로덕션 애플리케이션을 실행하지 않는 것이 좋습니다.
기능
v1
v1beta
콘텐츠 생성 - 텍스트 전용 입력
콘텐츠 생성 - 텍스트 및 이미지 입력
콘텐츠 생성 - 텍스트 출력
콘텐츠 생성 - 멀티턴 대화 (채팅)
콘텐츠 생성 - 함수 호출
콘텐츠 생성 - 스트리밍
콘텐츠 삽입 - 텍스트 전용 입력
답변 생성
시맨틱 리트리버
- 지원됨
- 지원되지 않음
SDK에서 API 버전 구성
Gemini API SDK는 기본적으로 v1beta를 사용하지만 다음 코드 샘플과 같이 API 버전을 설정하여 다른 버전을 사용할 수도 있습니다.
Python
fromgoogleimportgenaiclient=genai.Client(http_options={'api_version':'v1alpha'})response=client.models.generate_content(model='gemini-2.0-flash',contents="Explain how AI works",)print(response.text)
자바스크립트
import{GoogleGenAI}from"@google/genai";constai=newGoogleGenAI({httpOptions:{apiVersion:"v1alpha"},});asyncfunctionmain(){constresponse=awaitai.models.generateContent({model:"gemini-2.0-flash",contents:"Explain how AI works",});console.log(response.text);}awaitmain();
REST
curl"https://generativelanguage.googleapis.com/v1/models/gemini-1.5-flash:generateContent"\
-H"x-goog-api-key: $GEMINI_API_KEY"\
-H'Content-Type: application/json'\
-XPOST\
-d'{ "contents": [{ "parts":[{"text": "Explain how AI works."}] }] }'
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-22(UTC)"],[],[],null,["# API versions explained\n\nThis document provides a high-level overview of the differences between the `v1`\nand `v1beta` versions of the Gemini API.\n\n- **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, then the next 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.\n- **v1beta**: This version includes early-access features that may be under development and is subject to rapid and breaking changes. There is also no guarantee that the features in the Beta version will move to the stable version. Due to this instability, you should consider not launching production applications with this version.\n\n| Feature | v1 | v1beta |\n|----------------------------------------------------|----|--------|\n| Generate Content - Text-only input | | |\n| Generate Content - Text-and-image input | | |\n| Generate Content - Text output | | |\n| Generate Content - Multi-turn conversations (chat) | | |\n| Generate Content - Function calls | | |\n| Generate Content - Streaming | | |\n| Embed Content - Text-only input | | |\n| Generate Answer | | |\n| Semantic retriever | | |\n\n- - Supported\n- - Will never be supported\n\nConfigure API version in an SDK\n-------------------------------\n\nThe Gemini API SDK's default to `v1beta`, but you can opt to use other versions\nby setting the API version as shown in the following code sample: \n\n### Python\n\n from google import genai\n\n client = genai.Client(http_options={'api_version': 'v1alpha'})\n\n response = client.models.generate_content(\n model='gemini-2.0-flash',\n contents=\"Explain how AI works\",\n )\n\n print(response.text)\n\n### JavaScript\n\n import { GoogleGenAI } from \"@google/genai\";\n\n const ai = new GoogleGenAI({\n httpOptions: { apiVersion: \"v1alpha\" },\n });\n\n async function main() {\n const response = await ai.models.generateContent({\n model: \"gemini-2.0-flash\",\n contents: \"Explain how AI works\",\n });\n console.log(response.text);\n }\n\n await main();\n\n### REST\n\n curl \"https://generativelanguage.googleapis.com/v1/models/gemini-1.5-flash:generateContent\" \\\n -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n -H 'Content-Type: application/json' \\\n -X POST \\\n -d '{\n \"contents\": [{\n \"parts\":[{\"text\": \"Explain how AI works.\"}]\n }]\n }'"]]