Key Capabilities
- Text-to-image — Generate images from text descriptions
- Image editing — Pass a reference image via
inline_datacombined with text instructions for editing - Aspect ratio control —
1:1,4:3,3:4,16:9,9:16 - Resolution control —
1K(~1024px),2K(~2048px),4K(~4096px, by longest side) - Multimodal output — Return both image and text description via
responseModalities: ["TEXT", "IMAGE"]
Text-to-Image Example
Image Editing Example (with Reference Image)
Pass both atext instruction and an inline_data reference image in the same parts array.
Parameters
API Reference
View the interactive API Playground for Gemini 2.5 Flash Image.

