Skip to main content
The aspect_ratio field is required on every generation request. The supported set depends on the model.
Aspect ratioNanoBananaNanoBanana 2 / Pro
1:1
2:3
3:2
3:4
4:3
4:5
5:4
9:16
16:9
21:9
1:4
1:8
4:1
8:1
auto
from_prompt

Special values

auto
string
Infer the ratio from the first input image. Image-to-image only, and not supported by NanoBanana.
from_prompt
string
Let the model choose the ratio based on the prompt.
Passing a ratio that the model doesn’t support — for example auto or 4:1 to NanoBanana — results in a 422 validation error.