Skip to main content
The aspect_ratio field is required on every generation request. The supported set depends on the model.

Special values

string
The service picks a concrete ratio for you: a ratio named in the prompt (e.g. 16:9) wins; otherwise it snaps to the closest ratio to your first input image; otherwise (text-to-image with no ratio in the prompt) it defaults to 9:16. Supported on all models — for NanoBanana the result is always one of its supported ratios.
Passing a ratio that the model doesn’t support — for example 4:1 to NanoBanana — results in a 422 validation error.