GPT Image 2.5 image editing API: edit a photo with a prompt

Edit a photo with GPT Image 2.5 on Sume: send the image in input_references, describe the change, and set aspect_ratio to auto. Up to 16 references per call.

4 min readSume
All posts

To edit a photo with the GPT Image 2.5 API on Sume, send POST /v1/images with the source picture as an input_references item, a prompt that says only what to change, and aspect_ratio: "auto" so the output keeps the source's shape. There is no separate edit route: the same call generates from text when you send no references and edits when you send some.

OpenAI lists image edit (v1/images/edits) as a supported endpoint for both models; Sume's Image API docs describe the single-route form. Read 2026-09-29.

What does an edit request look like?

The image URL must be public HTTPS. Localhost, private-network and non-HTTPS URLs are rejected before submission.

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": "Change the sofa to dark green velvet. Keep the room, light and camera angle.",
    "input_references": [
      { "type": "image_url", "image_url": { "url": "https://example.com/living-room.jpg" } }
    ],
    "aspect_ratio": "auto"
  }'

Why set aspect_ratio to auto?

The docs say that on edit and image-to-image calls you should prefer auto to match the reference, and that omitting the field is not the same as sending auto. Without it the output may not follow the source's shape.

How many reference images can I send?

Up to 16 on the two 2.5 ids. OpenAI's guide specifies no maximum, so treat 16 as Sume's catalog limit. Use extra references for a second subject, a style or a product shot, and say in the prompt which image plays which role.

Reference limits from Sume's Image API docs, read 2026-09-29.
ModelReferences per requestMask
openai/gpt-image-2.5Up to 16mask_url optional
openai/gpt-image-2.5-sunburstUp to 16mask_url optional

Can I limit the edit to one region?

Yes, with mask_url; see GPT Image mask edit API. OpenAI describes masks as guidance, not a hard boundary, so verify the result. Prompt-only edits work too: name what must stay unchanged, as the example does.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume