The gemini-2.0-flash-preview-image-generation and gemini-2.5-flash-image-preview models will be retired on October 31, 2025. Migrate any workflows to gemini-2.5-flash-image before that date to avoid service disruption.
The model defaults to returning text and image responses (['Text', 'Image']). You can configure the response to return only images without text using ( ['Image']).
The model defaults to generates 1:1 squares. You can control the aspect ratio of the output image using the aspect_ratio field under image_config in the response request: The different ratios available and the size of the image generated are listed in this table: