Split an image into 2-4 editable layers by API: Qwen Image Layered

Send one picture to qwen-image-layered on Sume and get 2 to 4 transparent PNG layers, billed at $0.05 each. num_images is required; the call runs as a job.

4 min readSume
All posts

To split one flat picture into editable layers on Sume, call POST /v1/image-router/generate with model: "qwen-image-layered", exactly one URL in image_urls, and num_images set to 2, 3 or 4. Each layer is one transparent PNG and one billed image at $0.05, so a split costs $0.10 to $0.20 (price read in Sume's pricing table, 2026-10-14).

Older posts on this blog say Sume returns only flat images. That changed when the layer model landed on origin/main on 2026-10-12. The Studio Layers tab behind it is still a dev-flag page; the API model id is the stable part.

The rules the API enforces

The request schema refuses anything outside the model's contract, so these are hard limits, not tips.

  • Exactly one image in image_urls. Zero or two images return a validation error.
  • num_images (or n) is required and must be 2 to 4. An omitted count is refused, because the upstream default of four layers would not match what an omitted count prices at.
  • No aspect_ratio, resolution, quality or background. The layers follow the source picture.
  • Output is PNG, so each layer keeps its alpha channel.

A call that runs

Send it with mode: "async" and poll the job; the result lists one artifact URL per layer. Poll and result shapes are in Jobs and results.

import os, time, requests

API = "https://api.sume.com"
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}

body = {
    "model": "qwen-image-layered",
    "image_urls": ["https://example.com/poster.png"],
    "num_images": 3,
    "mode": "async",
}
r = requests.post(f"{API}/v1/image-router/generate", json=body, headers=H)
r.raise_for_status()
job = r.json()["data"]["job"]["id"]

while True:
    s = requests.get(f"{API}/v1/jobs/{job}/status", headers=H).json()
    status = s["data"]["job"]["status"]
    if status in ("completed", "failed", "cancelled"):
        break
    time.sleep(3)

res = requests.get(f"{API}/v1/jobs/{job}/result", headers=H).json()
print(status, res)

What a layer split is for

The CVPR 2026 paper behind the model describes decomposing an image into semantically separate RGBA layers so each can be recolored, replaced, resized or moved without touching the rest (read 2026-10-14). That suits ads and posters where you need the headline, product and background apart.

Layers are guesses about hidden pixels, so check the edges of each PNG before you ship. For a single object cut-out you may need only 2 layers; for a busy scene, 4 costs $0.20.

Split cost on Sume by layer count (pricing table read 2026-10-14)
num_imagesLayers returnedCost
22 PNG$0.10
33 PNG$0.15
44 PNG$0.20

Sources

Related posts

More in Models

All Models posts

Written by Sume