Nano Banana Pro 4:5 is not 1080x1350: crop and resize in Python
On Sume, Nano Banana Pro takes 4:5 at about 928x1152, not exact 1080x1350. Resize to Instagram's size locally with Pillow, with the small crop explained.

Nano Banana Pro will give you a 4:5 picture, but not a 1080x1350 one. The Sume docs say Banana Pro sends aspect_ratio: "4:5" with a native size of about 928x1152 at 1K, and that exact 1080x1350 is a post-step. Resize the result yourself; the script below does it with a crop of a few pixels.
The Sume Image API page states it plainly: 4:5 is Instagram portrait (1080x1350), "not 4:3," and on Nano Banana "WxH maps to the native aspect_ratio" so 1080x1350 becomes 4:5. The docs also name a job-level target_pixels post-step, but they do not show its request syntax, so this post does not guess it.
Why is 928x1152 not exactly 4:5?
Four by five means a ratio of 0.8. 928 divided by 1152 is about 0.8056, a little wider. 1080 divided by 1350 is exactly 0.8. So a straight resize would stretch the picture by under one percent, which is why a centre crop first is the safe route.
For a feed that mixes formats, the same pattern covers other targets: compute the crop from the target ratio, then scale. Pinterest's 2:3 and a 9:16 story follow the same two lines of arithmetic.
| Size | Width / height | Ratio |
|---|---|---|
| Native Banana Pro 4:5 at 1K (approx, Sume docs) | 928 x 1152 | 0.8056 |
| Instagram portrait target | 1080 x 1350 | 0.8000 |
How do you request it?
Send the ratio, not the pixels. Pixel strings on size are not served; use aspect_ratio and, on models that accept it, image_size. Google's guide lists 4:5 among the supported ratios for the Gemini 3.1 Flash Lite image model, and says 1K, 2K and 4K tiers exist across Gemini 3 models (Lite is 1K only), so ask for 2K on a model that offers it if you want more pixels to downscale from.
{
"model": "<banana pro id from GET /v1/images/models>",
"prompt": "Portrait product photo, centred, soft window light",
"aspect_ratio": "4:5",
"resolution": "2K"
}The resize step
Crop to exactly 4:5 first, then scale to 1080x1350. Install Pillow and point the script at the downloaded file.
from PIL import Image
def to_1080x1350(src, dst):
im = Image.open(src).convert("RGB")
w, h = im.size
new_w = min(w, round(h * 4 / 5))
new_h = round(new_w * 5 / 4)
left, top = (w - new_w) // 2, (h - new_h) // 2
im = im.crop((left, top, left + new_w, top + new_h))
im.resize((1080, 1350), Image.LANCZOS).save(dst, quality=95)
to_1080x1350("banana.png", "feed-1080x1350.jpg")Any catches?
If the generated file is smaller than 1080 wide, the resize upscales and softens. Generate at 2K, or upscale with the Image Upscale route first. Keep important content away from the outer edge, because the crop trims it.
If you need the pixels to be exact without any local step, a model that accepts custom pixels is the other route. The Image API docs list GPT, Seedream, FLUX, Qwen and Recraft rows as taking image_size as WIDTHxHEIGHT, with the GPT rules of multiples of 16 and a 3840 maximum edge, so a 1080x1350 request has to be checked against the row's own descriptor.
Sources
Related posts
More in Use cases
- Narrate a 2,000-word blog post with an AI voice: cost and steps
A 2,000-word post is roughly 12,000 characters, so one Sume TTS job at $0.0475 per 1,000 characters. The steps, settings and what to check before publishing.
- New York FAIR News Act: AI video labels and what is pending
New York's FAIR News Act would require a label on news video substantially made by generative AI. It awaits the governor; here is what the sources say.
- New York synthetic performer ad law: dubbing and audio-only exceptions
New York S8420A exempts AI used only to translate a human performer's language, audio-only ads and expressive works. What that means for a dubbed ad.
- Burn a rolling headline sequence onto a muted news clip
Put timed headlines on a muted news clip with video-captions cues, a card colour and anchor_ratio. $0.20 per clip up to 60 seconds, no speech needed.
Written by Sume