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.
- An OpenRouter-compatible video API: sume/auto or a pinned model
Sume's POST /v1/videos follows OpenRouter's video generation API field for field. Let sume/auto pick the model, or pin a catalog id like seedance-2.5.
- Image generation API with reference images: POST /v1/images
Send a prompt plus public HTTPS reference images to Sume's POST /v1/images. Pin a catalog model or send sume/auto; the catalog lists each model's limits.
- Video 1.0 and Image 1.0 are retiring soon: move to sume/auto
Sume Video 1.0 and Image 1.0 are retiring soon and already run as aliases for the Auto path. New integrations call /v1/videos or /v1/images with sume/auto.
Written by Sume