Mindlogic Logo
Docs
/
사용자관리자
API Gateway
팩트챗/API (Legacy)//models/generate-images
이 페이지는 Legacy API 문서입니다. 현재 API Gateway의 새 문서로 통합·이전될 예정이며, 신규 통합에는 API Gateway 사용을 권장합니다.

구글 이미지 생성

텍스트 프롬프트만 입력하면, 구글 Generative AI SDK의 generate_images 메서드가 자동으로 이미지를 생성해줍니다. 원하는 이미지 개수, 설명 이유(RAI), 이미지 포맷 등 다양한 옵션도 손쉽게 설정할 수 있어, 빠르고 유연한 이미지 생성이 가능합니다.
  • SDK: 구글 AI SDK
API지원 모델
google/models/generate-imagesimagen-3.0-generate-002

이미지 생성

POST/v1/api/google/models/generate-images

요청 헤더


파라미터

model

string

required

이미지 생성에 사용되는 모델의 이름입니다.
현재 지원 모델은 imagen-3.0-generate-002입니다.
prompt

string

required

생성하고자 하는 이미지의 텍스트 설명입니다.
config

object

이미지 생성에 대한 설정을 포함하는 선택적 구성 객체입니다.

마지막 수정 날짜: May 07, 2025

이전

/models/generate-content-stream

다음

/models/edit-image

요청 예시
curl https://factchat-cloud.mindlogic.ai/v1/api/google/models/generate-images\
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "model": "imagen-3.0-generate-002",
    "prompt": "An umbrella in the foreground, and a rainy night sky in the background",
    "config": {
      "number_of_images": 1,
      "include_rai_reason": true,
      "output_mime_type": "image/jpeg"
    }
  }'
응답 예시
{
    "generatedImages": [
        {
            "image": {
                "gcsUri": null,
                "imageBytes": "/9j/4SkRgBA..." //base64,
                "mimeType": "image/jpeg"
            },
            "raiFilteredReason": null,
            "safetyAttributes": {
                "categories": null,
                "scores": null,
                "contentType": null
            },
            "enhancedPrompt": "A detailed close-up of a black umbrella in the foreground, its dark fabric glistening with raindrops under the soft, ambient light of a rainy night. The background features a deep, inky blue night sky, with a soft glow from distant streetlights, creating a melancholic mood. A subtle mist hangs in the air, adding to the overall atmosphere of quiet solitude. The camera angle is slightly low, giving a sense of immersion into the scene. The rainy night sky is rich with deep blues and blacks, with subtle gradations of color that suggest the gentle fall of rain. The umbrella's handle, made of dark wood, is slightly out of focus, emphasizing the focus on the texture and detail of the umbrella's surface. The image captures the tranquility of a rainy night in a city."
        }
    ],
    "positivePromptSafetyAttributes": null
}