Skip to content
Open app

Aspect ratios

The aspect_ratio field is required in POST /api/v1/generations. The unified native API accepts the following values for Nano Banana 2.1, Nano Banana 2, Nano Banana 2 Lite, and Nano Banana Pro; the provider performs final model-specific validation:

1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9, auto

gemini-2.5-flash-image supports a smaller set: do not use 1:4, 1:8, 4:1, or 8:1. Nano Banana 2 Lite is limited to 1K resolution, regardless of aspect ratio. Final parameter support depends on the provider’s model.

With aspect_ratio: "auto", Moonez.ai does not send aspectRatio to the provider. The model chooses the aspect ratio. Moonez.ai does not insert 9:16 or extract an aspect ratio from the prompt, although the model may follow your instructions.

The generationConfig.imageConfig.aspectRatio field is optional. If omitted, Moonez.ai does not add it or set a default aspect ratio. To choose a format explicitly, pass a value such as "aspectRatio": "16:9".

In the Python SDK, use types.ImageConfig(aspect_ratio="16:9"). The auto value above applies to the native API: in a Gemini-compatible request, simply omit aspectRatio. Explicit values, including null or an empty string, are passed to the provider unchanged; this does not guarantee that they are valid.

See the SDK quickstart and Nano Banana 2.1 parameters.