AI sky replacement: swap the sky and keep the photo

AI sky replacement: send the photo to an image-edit model, describe only the new sky, and list what stays. Then check roof and tree edges. Cost and limits.

4 min readSume
All posts

AI sky replacement swaps a dull, grey, or blown-out sky for a new one without masking it by hand: you give an image-edit model the photo and a prompt that describes only the new sky and says the buildings, trees, and horizon stay. The model returns a redrawn version of the whole photo, so check the edges where the sky meets roofs, wires, and branches.

Below is how to do it with Sume's Image API, whose docs were read on 2026-09-29. Swapping everything behind a subject is a different edit, covered in how to change the background of a photo with AI.

How do I replace the sky in a photo with AI?

Host the photo at a public HTTPS URL and send it in input_references to POST /v1/images, on a model that takes references. ChatGPT Image 2.5 (openai/gpt-image-2.5) takes up to 16; for other models, read the input_references range from GET /v1/images/models. Send aspect_ratio: "auto" so the result keeps the photo's shape; on edit calls, leaving the field out is not the same.

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": "Replace only the sky with a clear blue sky and a few light white clouds. Keep the buildings, rooftops, trees, horizon line, people, and framing exactly the same.",
    "input_references": [
      { "type": "image_url", "image_url": { "url": "https://example.com/photos/street.jpg" } }
    ],
    "aspect_ratio": "auto",
    "n": 2
  }'

What should a sky replacement prompt say?

Say “replace only the sky”, describe the new sky, and list what must stay. AI photo editing prompts covers the change-one-thing pattern; for skies:

  • The sky itself: clear blue, scattered clouds, soft sunset, dramatic storm clouds.
  • The light: a bright blue sky over a scene lit by flat overcast light can look pasted in, so ask for the light on the scene to match the new sky, or keep a soft sky.
  • What stays: buildings, rooftops, trees, the horizon line, people, and any text or signs.
  • Reflections: if water or windows reflect the sky, say whether they should change too.

Can I mask the sky instead of describing it?

Not in a documented way. The docs name a mask only for ChatGPT Image 2.5, as an optional mask_url on edits (a public HTTPS URL), and they don't describe what the mask image should contain, so name the sky in the prompt instead. Either way the model redraws the image, so the rest of the photo is not guaranteed to be pixel-identical: compare each result with the original and keep the original file.

Ways to point a model at the sky, from the Image API docs, read 2026-09-29.
MethodWhere it worksWhat the docs say
Prompt plus the photo in input_referencesModels that take references, such as ChatGPT Image 2.5 (up to 16)A model whose input_references descriptor is {"min": 0, "max": 0} is text-to-image only and rejects references
mask_urlChatGPT Image 2.5 edits, the only model the docs name for itOptional public HTTPS mask URL; the mask's contents are not described
Several takes with nAny model, up to its own ceilingUp to 10 images per call; per-model ceilings are lower

How much does AI sky replacement cost?

It is an ordinary image edit, billed per completed image at the model's endpoint price, and a failed or cancelled generation is not billed; n: 2 is two billed images. Price lookup and limits are the same as for any photo edit, covered in AI real estate photo editing. For a folder of photos, run the same prompt once per photo, as in batch photo editing. The docs describe result URLs as Sume-hosted and signed, so download the files you keep.

Sources

Related posts

More in Models

All Models posts

Written by Sume