Which aspect ratios and resolution tiers (512px, 1K, 2K, 4K) does the Gemini API image doc list per Nano Banana model, and what is the default for generation versus edits?
Problem. Choosing aspect_ratio and image_size for a Gemini image model. Conditions. Gemini API response_format {type: image} with aspect_ratio and image_size fields. Method. By default the model matches the output size to the input image, otherwise it makes 1:1 squares; set aspect_ratio and image_size (1K default, 2K, 4K, and 512px on 3.1 Flash Image only) under response_format. The doc has per-model tables of exact pixels. Nano Banana 2.1 and 3.1 Flash Image share 14 ratios including extreme 1:4, 1:8, 4:1 and 8:1 (for example 1:1 is 1024x1024 at 1K, 2048x2048 at 2K, 4096x4096 at 4K; 16:9 is 1376x768 at 1K). 3.1 Pro Image lists 10 ratios (no 1:4, 1:8, 4:1, 8:1), and Gemini 2.5 Flash Image lists the same 10 at a single resolution (1:1 is 1024x1024). Gemini 3.1 Flash Lite Image supports only 1K. Failure modes. Pixel sizes are fixed per ratio, not free-form (unlike OpenAI's custom sizes) so an arbitrary size is not possible; the 2K token count differs by model, not covered here. The do...
Structured fields
{
"citations": [
{
"url": "https://ai.google.dev/gemini-api/docs/image-generation.md.txt",
"note": "Aspect ratios and image size; Features of Nano Banana; Nano Banana 2.1 table; Gemini 2.5 Flash Image table; Generate images up to 4K resolution"
}
]
}Evidence claims
- [sourced_fact] Problem. Choosing aspect_ratio and image_size for a Gemini image model. Conditions. Gemini API response_format {type: image} with aspect_ratio and image_size fields. Method. By default the model matches the output size to the input image, otherwise it makes 1:1 squares; set aspect_ratio and image_size (1K default, 2K, 4K, and 512px on 3.1 Flash Image only) under response_format. The doc has per-model tables of exact pixels. Nano Banana 2.1 and 3.1 Flash Image share 14 ratios including extreme 1:4, 1:8, 4:1 and 8:1 (for example 1:1 is 1024x1024 at 1K, 2048x2048 at 2K, 4096x4096 at 4K; 16:9 is 1376x768 at 1K). 3.1 Pro Image lists 10 ratios (no 1:4, 1:8, 4:1, 8:1), and Gemini 2.5 Flash Image lists the same 10 at a single resolution (1:1 is 1024x1024). Gemini 3.1 Flash Lite Image supports only 1K. Failure modes. Pixel sizes are fixed per ratio, not free-form (unlike OpenAI's custom sizes) so an arbitrary size is not possible; the 2K token count differs by model, not covered here. The doc's feature list mentions Flash Lite Image 'adds' ten ratios but the table section lists no Flash Lite table. Limitations. No prices. Version/date. Fetched 2026-10-24T00:55:40Z. · locator: Aspect ratios and image size; Features of Nano Banana; Nano Banana 2.1 table; Gemini 2.5 Flash Image table; Generate images up to 4K resolution source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |