Skip to main content
POST
단계별 예시는 Gemini 이미지 모델 사용을 참고하세요.
Google이 이미지 모델과 generateContent를 업데이트함에 따라 Gemini 이미지 생성 옵션은 변경될 수 있습니다. 최신의 전체 파라미터 목록과 provider별 동작은 Gemini 이미지 생성 문서에서 확인하세요.
gemini-2.5-flash-image는 provider에 의해 2026-10-02에 종료될 예정입니다. 새 프로젝트에는 gemini-3.1-flash-image-preview 또는 gemini-3-pro-image-preview를 사용하세요. 자세한 내용은 Google의 지원 중단 일정을 참조하세요.
Gemini 이미지 응답에는 thoughttrue인 중간 이미지 파트가 포함될 수 있습니다. 이것은 최종 출력이 아닙니다. 생성된 이미지를 저장할 때는 thought: true 파트를 건너뛰고, inlineData가 존재하며 thoughttrue가 아닌 마지막 이미지 파트를 사용하세요.

인증

Authorization
string
header
필수

Use your CometAPI API key.

경로 매개변수

model
string
기본값:gemini-3.1-flash-image-preview
필수

The Gemini image model to use. See the Models page for current options.

본문

application/json
contents
object[]
필수

Conversation turns. Each item has a role ("user" or "model") and parts array containing text and/or image data.

generationConfig
object

Controls generation behavior — output modalities, image resolution, thinking, etc.

tools
object[]

Optional tools. Pass [{"google_search": {}}] to enable Google Search grounding for real-time information in generated images.

응답

200 - application/json

Success

candidates
object[]
usageMetadata
object