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.

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(orn) 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,qualityorbackground. 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.
| num_images | Layers returned | Cost |
|---|---|---|
| 2 | 2 PNG | $0.10 |
| 3 | 3 PNG | $0.15 |
| 4 | 4 PNG | $0.20 |
Sources
Related posts
More in Models
- Stable Audio 2.5 on Sume: a 190 s track costs the same as a 5 s one
Stable Audio 2.5 on Sume's Music Router takes duration_seconds 5 to 190 and bills one flat price per track, so ask for the full length you need.
- AI video API clip length: which Sume models accept it, and the cost
Which Sume video models accept a clip length by API, which refuse it at validation, and what each accepting model costs, one row per clip length.
- AI video clip price on Sume, by model, length and resolution
The price of one AI video clip on every Sume video model, by clip length and resolution, as each of these posts read the catalog.
- Cheapest AI video model on Sume by clip length and resolution
Which Sume video model makes a clip of a given length and resolution for the least, and what the dearest model that can make it costs.
Written by Sume