Generate images using Gemini Flash Image model with the official Gemini API format
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
contents | array | ✅ Yes | - | An array of content objects representing the generation prompt. The role of the message sender. Typically "user". Optional for single-turn requests. |
parts | array | ✅ Yes | - | An array of parts that make up the message content. Text prompt for image generation. |
generationConfig | object | ❌ No | - | Configuration for the image generation behavior. Response modalities. For image generation, use ["TEXT", "IMAGE"]. |
imageConfig | object | ❌ No | - | Image-specific configuration. Aspect ratio for the generated image. Examples: "16:9", "1:1", "9:16". |