Imagen 4
Google Imagen 4 is a professional image generation model, called through the Gemini API endpoint.Basic Usage
Response Format
Parameter Description
imageGenerationConfig
| Parameter | Type | Description |
|---|---|---|
numberOfImages | integer | Number of images to generate, 1-4 |
aspectRatio | string | Aspect ratio: 1:1, 16:9, 9:16, 4:3, 3:4 |
Batch Generation
Imagen 4 is a pure image generation model, so
responseModalities should be set to ["IMAGE"]. If you need text descriptions alongside images, use the Gemini image generation model instead.For Imagen 4 prompts, it is recommended to use detailed descriptive language including style, lighting, composition, and other details for better generation results.