AI ad resizer: one image, several aspect ratios, one API
Sume has no resizer button. Send the same source image to POST /v1/images once per aspect_ratio (1:1, 4:5, 9:16, 16:9) and recompose each ad slot.

An AI ad resizer on Sume is a loop of edit calls: send the same source image to POST /v1/images once for each aspect_ratio you need, with a prompt that says to keep the subject and recompose the scene. Each call returns a new image in that ratio, not a crop of the old one.
Everything here comes from the Image API docs, read 2026-09-30. The docs do not describe an outpaint or smart-crop mode, so quality of the recomposition depends on the model and prompt you pick.
Which aspect ratios can I ask for?
The normalized list in the docs is 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 9:21 and 21:9. A model only accepts the values its catalog descriptors list, so read supported_parameters for your model before pinning a ratio.
| Slot shape | `aspect_ratio` | In the docs list? |
|---|---|---|
| Square feed | 1:1 | Yes |
| Portrait feed | 4:5 | Yes |
| Full-screen vertical | 9:16 | Yes |
| Landscape banner | 16:9 | Yes |
| Wide strip | 21:9 | Yes |
How do I send one source image for several sizes?
Put the source in input_references and change only aspect_ratio per call. Reference URLs must be public HTTPS; localhost, private-network and non-HTTPS URLs are rejected before submission.
const ratios = ["1:1", "4:5", "9:16", "16:9"];
const results = await Promise.all(
ratios.map(async (aspect_ratio) => {
const res = await fetch("https://api.sume.com/v1/images", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.SUME_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "openai/gpt-image-2",
prompt: "Keep the product and colors; recompose the scene for this frame",
input_references: [
{ type: "image_url", image_url: { url: "https://example.com/ad.png" } },
],
aspect_ratio,
}),
});
return { aspect_ratio, body: await res.json() };
}),
);
console.log(results);Why not use n for the different sizes?
n requests up to 10 images per call, but one call carries one aspect_ratio. It gives you variations of one shape, which is useful for picking the best of several tries in a single ratio. Per-model ceilings on n are lower, so read the n range descriptor from the catalog.
When should I use aspect_ratio auto?
Use auto when you want the output to keep the source's shape, for example a color or copy edit. The docs say that on edit and image-to-image calls you should prefer aspect_ratio: "auto" to match the reference, and that omitting the field is not the same as auto. For resizing you want the opposite, so always pass an explicit ratio. A related page covers the options for each model: image API aspect ratios and custom sizes.
What should I check before shipping the set?
Compare each output against the source: logos, product shape and any text. Regenerated scenes can change small details, and the docs make no promise of pixel fidelity. Check each ad network's own size specs separately; this page does not state them.
Sources
Related posts
More in Use cases
- Seedance 2.5 draft mode: a 480p-then-1080p loop on Sume
Higgsfield added Seedance 2.5 Draft Mode. On Sume there is no draft model: render at resolution 480p, pick a take, then re-request at 1080p.
- Seedream 5.0 pro bbox and point tags vs region edits on Sume
Seedream 5.0 pro edits a region from <bbox> and <point> tags on a 0-999 grid. Sume lists other Seedream ids; use mask_url on ChatGPT Image 2.5 for regions.
- Shopify's recommended 2048 x 2048 product image with gpt-image-2.5
Shopify.dev recommends 2048 x 2048 px for product images. That is a valid custom image_size on Sume's gpt-image-2.5: 2048 is a multiple of 16 and 4,194,304 px.
- Black Friday homepage hero image for Shopify: one set, many sizes
Shopify's BFCM checklist says to put seasonal motifs in the hero image and extend it across channels. Render one reference to each channel's ratio with Sume.
Written by Sume