AI product photo: change the background to a lifestyle scene

Send the white-background product shot as a reference with an edit prompt and aspect_ratio auto, and Sume returns a new scene. A mask keeps the product fixed.

4 min readSume
All posts

To change a product photo's background to a lifestyle scene through Sume, send the existing shot as a reference image, write an edit prompt that says what stays and what changes, and set aspect_ratio to auto so the output follows the original frame. For tighter control, add mask_url on openai/gpt-image-2.5, which lets you mark the area the edit should cover.

The request shapes come from the Image API docs and the Image 1.0 page, read 2026-09-29. Sume's docs make no promise that the product will come back pixel-identical, so review each result.

Which request fields carry the edit?

There are two routes in the docs. The current one is POST /v1/images, and the older Image 1.0 route, marked as retiring, uses different field names.

Edit fields by route, read 2026-09-29.
FieldPOST /v1/imagesImage 1.0 (retiring)
Source photoinput_referencesimage_urls, 1 to 10
Maskmask_url (gpt-image-2.5 only)mask_image_url
Ratioaspect_ratio: "auto"aspect_ratio
Qualityquality, per modellow, medium, high

What should the edit prompt say?

Name the thing that must not move, then the new setting. The Image 1.0 page uses exactly that pattern: "Keep the product identical; swap the background to a soft daylight studio". For a lifestyle scene, keep the second half concrete, such as a kitchen counter at morning light, and leave lighting words consistent with the scene.

How do I keep the edit inside the background?

Provide a mask over the area to change. ChatGPT Image 2.5 accepts an optional public HTTPS mask_url beside the references. No other image row lists that field, so sending it elsewhere returns 400 unsupported_parameter.

curl -X POST https://api.sume.com/v1/images \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2.5",
    "prompt": "Keep the mug identical; place it on a sunlit kitchen counter",
    "input_references": ["https://example.com/mug-white.png"],
    "mask_url": "https://example.com/mug-mask.png",
    "aspect_ratio": "auto"
  }'

Why does aspect_ratio auto matter?

On edit calls the docs say to prefer auto so the result matches the reference, and that leaving the field out is not the same as auto. If you skip it, the frame may not match your listing image, and you will crop after the fact.

What should the source photo look like?

Use a public HTTPS URL to the cleanest version of the product you have: full frame, no crop through the object, and a plain backdrop if you can. The reference is the only thing telling the model what the product looks like, so an image with a partly hidden label gives the edit nothing to preserve. If the URL is signed or private, the fetch can fail, so host the photo somewhere fetchable before you send it. Then judge the result at listing size, not in a thumbnail, since small shape changes only show up when you zoom.

How do I make several scenes from one photo?

Repeat the call with a different scene sentence each time and the same reference. Each result URL is Sume-hosted and signed, so copy the files you keep into your own storage. The wider workflow, from cutout to scene, is in white background product photos with AI, and scene-writing ideas are in AI lifestyle product photography.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume