AI image generation API aspect ratios: 4:5, custom sizes, and auto
Send aspect_ratio or image_size to Sume's POST /v1/images: which image models accept 4:5, which take custom pixel sizes, and when to send auto on edits.

To get a 4:5 image from Sume's AI image generation API, send POST /v1/images with aspect_ratio: "4:5" to a model that lists it, or send custom pixels in image_size to a model that takes them. 4:5 is Instagram portrait (1080×1350), not 4:3, and each model publishes its own ratio list.
Ratio lists come from the descriptors GET /v1/images/models serves; the rules come from the Image API docs and the image_size notes on the retiring Image 1.0 page. All were read on 2026-09-26.
Which image models accept 4:5?
Every catalog model lists 4:5 except x-ai/grok-image, google/imagen-4-fast, and google/imagen-4-ultra. The lists differ in length and in their widest and tallest shapes, so read a model's supported_parameters before you pin a ratio:
| Models | `aspect_ratio` values | Custom pixels in `image_size` |
|---|---|---|
openai/gpt-image-2, openai/gpt-image-2.5, openai/gpt-image-2.5-sunburst | auto, 1:1, 16:9, 9:16, 4:3, 3:4, 5:4, 9:8, 4:5 | Yes, within the ChatGPT Image limits |
google/nano-banana-2 | auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 4:1, 1:4, 8:1, 1:8 | No; mapped to a listed ratio |
google/nano-banana-pro | auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 | No; mapped to a listed ratio |
bytedance-seed/seedream-5-lite, bytedance-seed/seedream-4.5 | 1:1, 16:9, 9:16, 4:3, 3:4, 4:5, 5:4, 3:2, 2:3 | Yes |
bytedance-seed/seedream-4 | auto, 1:1, 16:9, 9:16, 4:3, 3:4, 4:5, 5:4, 3:2, 2:3 | Yes |
x-ai/grok-image | 2:1, 20:9, 19.5:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:19.5, 9:20, 1:2 | No |
qwen/qwen-image, qwen/qwen-image-max, black-forest-labs/flux.2-pro, black-forest-labs/flux.2-flex, recraft/recraft-v4 | 1:1, 16:9, 9:16, 4:3, 3:4, 4:5, 5:4, 3:2, 2:3, 21:9, 9:21, 1:2, 2:1 | Yes |
google/imagen-4-fast, google/imagen-4-ultra | 1:1, 16:9, 9:16, 4:3, 3:4 | No |
ideogram/ideogram-v3 | 1:3, 3:1, 1:2, 2:1, 9:16, 16:9, 10:16, 16:10, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 1:1 | No |
How do I send a custom pixel size?
Put it in image_size, as { "width": 1024, "height": 1280 } or the string "1024x1280", on the ChatGPT Image, Seedream, Flux, Qwen, and Recraft models. On those models aspect_ratio is ignored when image_size is set. Pixels never belong on size: that field is a resolution-tier shorthand, and pixels there return 400 unsupported_parameter.
The docs publish one pixel box, written for the ChatGPT Image models, and its first rule is that both edges are multiples of 16 (the GPT Image 2.5 API lists the rest). 1080×1350 breaks that rule, so those models serve aspect_ratio: "4:5" as 1024×1280, the size in this example:
image_sizealso takes six named presets:square_hdandsquare(1:1),portrait_4_3(3:4),portrait_16_9(9:16),landscape_4_3(4:3), andlandscape_16_9(16:9). None of them is 4:5.- The ChatGPT Image models also take
image_size: "auto".
curl -X POST "https://api.sume.com/v1/images" \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2",
"prompt": "a product photo on a linen backdrop",
"image_size": { "width": 1024, "height": 1280 }
}'What does aspect_ratio auto do?
It hands the choice to the provider. On edit and image-to-image calls, the docs recommend aspect_ratio: "auto" so the output follows the reference, and leaving the field out is not the same as sending auto.
Only 6 models list auto: openai/gpt-image-2, openai/gpt-image-2.5, openai/gpt-image-2.5-sunburst, google/nano-banana-2, google/nano-banana-pro, and bytedance-seed/seedream-4. Any other model refuses it, so an edit on Seedream 4.5 or Flux 2 Pro needs an explicit ratio from its list.
What happens to pixels on a model without custom sizes?
Nano Banana 2 and Nano Banana Pro map a WIDTHxHEIGHT or { width, height } value to a native ratio, so 1080×1350 becomes 4:5. Their size control is the resolution tier, covered in the Nano Banana Pro API.
Imagen 4, Ideogram V3, and Grok Imagine render only the ratios on their lists, and the docs describe no custom-pixel support for them.
Why was my aspect ratio rejected?
Either the value is off the model's list or it sits in the wrong field. A parameter the model does not list at all returns 400 unsupported_parameter, and these requests are refused as well:
- A ratio missing from the model's list, such as
4:5on Imagen 4 or21:9on a ChatGPT Image id. autoon a model that does not list it, such as Seedream 4.5.- Pixels on
sizeinstead ofimage_size. - A ChatGPT Image custom size outside the published pixel box.
Sources
Related posts
Written by Sume