aspect_ratio field is required on every generation request. The supported set depends on the model.
Special values
string
Infer the ratio from the first input image. Image-to-image only, and not supported by NanoBanana.
string
Let the model choose the ratio based on the prompt.