Gemini로 생성형 AI 솔루션을 개발할 때 Google은 두 가지 API 제품을 제공합니다. Gemini Developer API와 Gemini Enterprise 에이전트 플랫폼 API입니다.
Gemini Developer API는 Gemini 기반 애플리케이션을 빌드, 프로덕션화, 확장하는 가장 빠른 경로를 제공합니다. 대부분의 개발자는 특정 엔터프라이즈 제어가 필요한 경우가 아니면 Gemini Developer API를 사용해야 합니다.
Gemini Enterprise 에이전트 플랫폼은 Google Cloud Platform을 기반으로 생성형 AI 애플리케이션을 빌드하고 배포하기 위한 엔터프라이즈 지원 기능 및 서비스의 포괄적인 생태계를 제공합니다.
최근에 이러한 서비스 간의 마이그레이션을 간소화했습니다. 이제 Gemini Developer API와 Gemini Enterprise 에이전트 플랫폼 API 모두 통합 Google 생성형 AI SDK를 통해 액세스할 수 있습니다.
코드 비교
이 페이지에는 텍스트 생성을 위한 Gemini Developer API와 Gemini Enterprise 에이전트 플랫폼 빠른 시작 간의 나란히 코드 비교가 나와 있습니다.
Python
google-genai 라이브러리를 통해 Gemini Developer API와 Gemini Enterprise 에이전트 플랫폼 서비스에 모두 액세스할 수 있습니다. 라이브러리 페이지
에서 google-genai 설치 방법을 확인하세요.
Gemini Developer API
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-flash-preview", contents="Explain how AI works in a few words"
)
print(response.text)
Gemini Enterprise 에이전트 플랫폼 API
from google import genai
client = genai.Client(
vertexai=True, project='your-project-id', location='us-central1'
)
response = client.models.generate_content(
model="gemini-3-flash-preview", contents="Explain how AI works in a few words"
)
print(response.text)
JavaScript 및 TypeScript
@google/genai 라이브러리를 통해 Gemini Developer API와 Gemini Enterprise 에이전트 플랫폼 서비스에 모두 액세스할 수 있습니다. 라이브러리 페이지에서 @google/genai를 설치하는 방법
을 참고하세요.
Gemini Developer API
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
async function main() {
const response = await ai.models.generateContent({
model: "gemini-3-flash-preview",
contents: "Explain how AI works in a few words",
});
console.log(response.text);
}
main();
Gemini Enterprise 에이전트 플랫폼 API
import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({
vertexai: true,
project: 'your_project',
location: 'your_location',
});
async function main() {
const response = await ai.models.generateContent({
model: "gemini-3-flash-preview",
contents: "Explain how AI works in a few words",
});
console.log(response.text);
}
main();
Go
google.golang.org/genai 라이브러리를 통해 Gemini Developer API와 Gemini Enterprise 에이전트 플랫폼 서비스에 모두 액세스할 수 있습니다. 라이브러리 페이지에서 google.golang.org/genai를 설치하는 방법을 참고하세요.
Gemini Developer API
import (
"context"
"encoding/json"
"fmt"
"log"
"google.golang.org/genai"
)
// Your Google API key
const apiKey = "your-api-key"
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
// Call the GenerateContent method.
result, err := client.Models.GenerateContent(ctx, "gemini-3-flash-preview", genai.Text("Tell me about New York?"), nil)
}
Gemini Enterprise 에이전트 플랫폼 API
import (
"context"
"encoding/json"
"fmt"
"log"
"google.golang.org/genai"
)
// Your GCP project
const project = "your-project"
// A GCP location like "us-central1"
const location = "some-gcp-location"
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, &genai.ClientConfig
{
Project: project,
Location: location,
Backend: genai.BackendVertexAI,
})
// Call the GenerateContent method.
result, err := client.Models.GenerateContent(ctx, "gemini-3-flash-preview", genai.Text("Tell me about New York?"), nil)
}
기타 사용 사례 및 플랫폼
다른 플랫폼 및 사용 사례는 Gemini Developer API 문서 및 Gemini Enterprise 에이전트 플랫폼 문서 의 사용 사례별 가이드를 참고하세요.
마이그레이션 고려사항
마이그레이션할 때 다음 사항을 참고하세요.
인증하려면 Google Cloud 서비스 계정을 사용해야 합니다. 자세한 내용은 Gemini Enterprise 에이전트 플랫폼 문서 를 참고하세요.
기존 Google Cloud 프로젝트 (API 키를 생성하는 데 사용한 동일한 프로젝트)를 사용하거나 새로 Google Cloud 프로젝트 를 만들 수 있습니다.
지원되는 리전은 Gemini Developer API와 Gemini Enterprise 에이전트 플랫폼 API 간에 다를 수 있습니다. Google Cloud의 생성형 AI가 지원되는 리전 목록을 참고하세요.
Google AI Studio에서 만든 모든 모델은 Gemini Enterprise 에이전트 플랫폼에서 재학습을 거쳐야 합니다.
Gemini Developer API에 Gemini API 키를 더 이상 사용할 필요가 없으면 보안 권장사항에 따라 삭제합니다.
API 키를 삭제하는 방법은 다음과 같습니다.
삭제할 API 키를 찾아 작업 아이콘을 클릭합니다.
API 키 삭제 를 선택합니다.
사용자 인증 정보 삭제 모달에서 삭제 를 선택합니다.
API 키 삭제가 반영되기까지 몇 분 정도 걸립니다. 키 삭제가 완료되면, 삭제된 API 키를 사용하는 모든 트래픽이 거부됩니다.
다음 단계
- Gemini Enterprise 에이전트 플랫폼의 생성형 AI 솔루션에 대해 자세히 알아보려면 Gemini Enterprise 에이전트 플랫폼의 생성형 AI 개요 를 참고하세요.