AI product color changer: colorways through an image edit API

To recolor a product photo, send it as an input_references image with a prompt naming the new color. Sume's edit calls take up to 10 images per request.

4 min readSume
All posts

Send the product photo as an input_references image to POST /v1/images with a prompt that names the new color and says to keep everything else. Set aspect_ratio to "auto" so the output matches the photo, and use n to get several takes in one call. Sume's docs do not promise pixel-exact preservation, so compare each result to the original.

Request rules are from Image generation and editing, read 2026-09-30. Ideogram's page is cited only for the trend: it lists color and lighting among its precise edit uses, with a Colorways app.

What does the request look like?

Nano Banana 2 (google/nano-banana-2) is edit-capable in Sume's catalog and lists auto among its aspect ratios. Ideogram V3 is edit-capable too, but its ratio list has no auto, so with it you would pass an explicit 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: "google/nano-banana-2",
    prompt: "Same product, recolored to forest green. Keep shape, lighting and background unchanged.",
    aspect_ratio: "auto",
    n: 2,
    input_references: [
      { type: "image_url", image_url: { url: "https://example.com/product.jpg" } },
    ],
  }),
});
console.log(await res.json());

Which fields matter for a recolor?

Edit-call fields from the Sume docs, read 2026-09-30.
FieldWhy it matters
input_referencesThe source photo; URLs must be public HTTPS
aspect_ratio: "auto"Matches the reference; omitting the field is not the same as auto
nUp to 10 images per call; per-model ceilings are lower
Unlisted field400 unsupported_parameter

How do I make a full set of colorways?

Loop over your color list and send one request per color with the same source photo. Keep the prompt identical except for the color word, so differences between outputs come from the color. For large batches see batch photo edits.

How should I check the results?

Compare each output with the original for shape, label text and background. If an edit drifts, narrow the prompt to the object. Mask support is limited: mask_url is documented for ChatGPT Image 2.5 edits only. See changing the color of an object.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume