Check Sume image-model ratios in code before a channel render

Before rendering one product photo for four marketplaces, read GET /v1/images/models and pick a model whose aspect_ratio values cover every channel you sell on.

5 min readSume
All posts

To find out which aspect ratios a Sume image model accepts, call GET /v1/images/models and read the aspect_ratio values in each model's supported_parameters. Do that before you render one product photo for several channels, because a ratio one model takes may be rejected by another.

This matters more as sellers spread out. Amazon's Seller Central now connects eBay, Shopify, TikTok and Walmart accounts (read 2026-10-04), and each channel shows images in its own shapes.

Where is the list?

In the model discovery response. Each model has an id, an architecture with input and output modalities, and supported_parameters. A parameter such as aspect_ratio is an enum with its allowed values, and input_references is a range with a minimum and maximum. The per-model endpoints path returns the definitive set and pricing lines for that model.

Image model discovery fields, from Sume docs, read 2026-10-04
FieldWhat it tells you
idThe slug you pass as model
supported_parameters.aspect_ratioEnum of accepted ratios for that model
supported_parameters.input_referencesHow many reference images it takes (min to max)
supported_parameters.output_formatpng, jpeg, webp, or svg where offered
endpointsPath to the per-model record with pricing

How do you check them in a script?

List the models and print the accepted ratios for the ones you care about. The docs example for Seedream 4.5 shows 1:1, 16:9, 9:16, 4:3 and 3:4; treat the live response, not that example, as the source.

import os, requests

r = requests.get(
    "https://api.sume.com/v1/images/models",
    headers={"Authorization": "Bearer " + os.environ["SUME_API_KEY"]},
    timeout=30,
)
r.raise_for_status()
need = {"1:1", "9:16", "16:9"}
for m in r.json()["data"]:
    ar = m.get("supported_parameters", {}).get("aspect_ratio", {})
    ok = need <= set(ar.get("values", []))
    print(m["id"], "covers all" if ok else "missing some")

What if the model does not take a ratio?

Some models take custom pixels instead. The docs say image_size accepts width and height on models that allow custom pixels, such as GPT, Seedream, Flux, Qwen and Recraft, and that aspect_ratio is ignored when image_size is set on those. GPT custom sizes need both edges as multiples of 16, a maximum edge of 3840 and a ratio of at most 3:1.

What should you decide first?

List the shapes your channels use, check each on the channel's own current page, then pick the model whose descriptors cover them. Where none does, render the nearest ratio and crop in your own pipeline, and look at the crop before you upload it.

Sources

Related posts

More in Models

All Models posts

Written by Sume