image_size beats aspect_ratio on Sume /v1/images: send one, not both

On /v1/images, image_size has priority over aspect_ratio. Use exact pixels for GPT Image 2.5 and an aspect ratio plus resolution tier for Nano Banana.

4 min readSume
All posts

When a /v1/images request has both image_size and aspect_ratio, the Sume docs say image_size has priority. Send only one: exact pixels in image_size for GPT, Seedream, Flux, Qwen and Recraft rows, and an aspect_ratio for rows that only list an enum.

The two fields are different tools, and sending both only invites a result you did not mean.

Which field for which model

Size fields by model family (read 2026-10-06)
Model familyUseNotes
GPT Image 2.5, GPT Image 2image_sizeCustom pixels: multiples of 16, max edge 3840, aspect up to 3:1, 655,360 to 8,294,400 pixels
Nano Banana 2 and Proaspect_ratio + resolutionSend the ratio and a resolution tier; plan a resize or crop for exact pixels
Models with only an aspect enumaspect_ratioSend a ratio from the list

The size shorthand is not pixels

size is a tier shorthand only, and it rejects WxH; custom pixels go on image_size. That split trips people porting code from other APIs (port checklist).

A habit that avoids surprises

Read the model's descriptors from GET /v1/images/models first, send the one field that model lists, and check the image dimensions on the way back. A 4:5 Instagram portrait is 1080x1350, but a legal GPT box is 1024x1280, so the 4:5 post shows the resize.

Check it on your own account

Do not budget from a blog table alone. GET /v1/images/models lists every model with its descriptors, and GET /v1/images/models/{id}/endpoints shows the pricing line for one model. Then run one small request and read usage.cost on the response, which is the billed amount in USD; the token counts in usage are reported as 0 on this route.

Run the test at the quality and size you plan to ship, because both move the price. A single test at low quality costs under a cent for most sizes here, so it is a cheap way to confirm your assumptions before a batch.

Sync, async and failures

The /v1/images route waits up to 30 seconds for the image. If the job finishes in that window you get the result directly; otherwise you get a 202 and an async job to poll. Write your client to branch on the status code, since larger sizes and higher quality are the likely cases for a 202.

Requests are strict. A parameter the chosen model does not list returns 400 unsupported_parameter, stream returns a 400, and provider.only or provider.order accept only sume. Treat a 400 as a bug in the request, not a transient error, and do not retry it unchanged.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume