개발자 가이드
Gemini 2.5 Flash Image를 애플리케이션에 통합하는 방법을 알아보세요. 기본 설정부터 고급 기능까지 필요한 모든 것이 여기에 있습니다.
API 통합 코드 예제 모범 사례 실용적인 튜토리얼
빠른 시작
1. API 키 가져오기
먼저 Google AI Studio에서 API 키를 가져와야 Gemini 2.5 Flash Image에 액세스할 수 있습니다.
2. SDK 설치
npm install @google/generative-ai
3. 기본 사용 예제
import { GoogleGenerativeAI } from "@google/generative-ai";
const genAI = new GoogleGenerativeAI(API_KEY);
const model = genAI.getGenerativeModel({ model: "gemini-2.5-flash-image" });
const result = await model.generateContent([
"산日落 이미지 생성",
// 필요한 경우 이미지 파일 추가
]);
console.log(result.response.text());
추가 리소스
Gemini 2.5 Flash Image를 최대한 활용할 수 있는 더 많은 도구와 리소스를 탐색하세요