How to combine two photos into one with AI
Yes, AI can combine two photos into one: send both as references to an image model and describe the single scene you want. How to do it with Sume.

Yes, AI can combine two photos into one: send both to an image model that edits from reference images and describe the single scene you want, such as who or what stands where, the setting, and the light. The model draws a new picture from the two, so faces and details can change. For two photos placed side by side unchanged, make a collage in an image editor instead.
With Sume, the merge is one POST /v1/images call with two input_references. The details below come from the Image API docs and the catalog that GET /v1/images/models serves, read on 2026-09-27.
How do I merge two photos with the Image API?
Send both photos as references, describe the combined scene in prompt, and set the output aspect_ratio yourself. The example below puts a person from one photo into the place from the other.
- A reference entry is only
type: "image_url"and a URL, with no field that says what the photo is for. Describe each photo in the prompt by what it shows, such as "the man in the blue jacket" or "the lighthouse on the cliff". - Both URLs must be public HTTPS. Localhost, private-network, and non-HTTPS URLs are rejected before submission.
nasks for several versions in one call, up to 4 on ChatGPT Image 2.5 today, so you can choose between them.
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": "The man in the blue jacket standing on the cliff path in front of the lighthouse, on the left third of the frame, in the same late-afternoon light as the landscape. Keep his face, hair, and jacket as they are.",
"aspect_ratio": "16:9",
"n": 4,
"input_references": [
{ "type": "image_url", "image_url": { "url": "https://example.com/person.jpg" } },
{ "type": "image_url", "image_url": { "url": "https://example.com/lighthouse.jpg" } }
]
}'What should the prompt say?
Anything you leave out, the model decides for you. Pin down:
- Who or what comes from each photo, described by what it shows.
- Where each subject stands and how large it is: "on the left third", "both waist-up, shoulder to shoulder".
- The setting: the background of one photo, or a new one you describe.
- One light for the whole frame: its direction and the time of day.
- What must stay: "Keep each person's face and hair as in their photo."
Which aspect ratio will the merged photo have?
The one you set. aspect_ratio: "auto" matches the output to the reference, and the docs do not say which reference it follows when there are two, so name a ratio from the model's list; a model only accepts the values its catalog lists. For an exact pixel size instead of a ratio, see AI image generation API aspect ratios.
Which models can take two photos?
One that edits from reference images. A text-to-image-only model, whose input_references descriptor is {"min": 0, "max": 0}, rejects references. These models edit from references and take two photos or more:
| Model id | Reference images | Versions per call | Lists `"auto"` |
|---|---|---|---|
openai/gpt-image-2.5 | Up to 16 | 1–4 | Yes |
openai/gpt-image-2 | Up to 10 | 1–4 | Yes |
google/nano-banana-pro | Up to 10 | 1–4 | Yes |
google/nano-banana-2 | Up to 10 | 1–4 | Yes |
bytedance-seed/seedream-4.5 | Up to 10 | 1 | No |
Will the people look like themselves?
Not guaranteed. The model renders a new image, so a face, a hand, or a logo can come back different. Compare each result with both originals and generate a few versions. Only combine photos of people who agreed to it, and do not present a merged photo as a record of a real event.
For several product photos in one shot, combine multiple product photos into one image also covers a catalog Format. For one character across many images, see consistent character AI image generator.
What are the limits?
- The API takes URLs, not file bytes, so both photos need public HTTPS URLs.
- Image billing is all-or-nothing and per completed image: four versions cost four images, and a failed generation is not billed.
- Result URLs are Sume-hosted and signed. Download the images you keep.
Sources
Related posts
More in Models
- How to generate variations of an image with AI
Send the image as a reference, say what may change and what must stay, and set n for several results per call. How to do it on Sume's Image API.
- Image to music AI: generate a track from a photo
Image to music AI uses a picture as an input for a track. On Sume, send image_url with the text prompt to the Music Router; the price stays the same.
- Image to video vs reference to video: what's the difference?
Image-to-video makes your picture the first frame; reference-to-video uses pictures, clips, or audio as guidance. Which to use, and which one wins.
- Text to speech in Korean: send Hangul text with language ko
For Korean text to speech, send the script in Hangul with the language set to ko. How Sume's TTS API reads Korean, checks the voice, and bills it.
Written by Sume