Qwen Image Layered
Playground
Try it on WavespeedAI!Qwen-Image Layered is a unified image-layer decomposition model for prompt-guided compositing. Provide points, boxes, or rough masks to isolate subjects and regions, and the model splits a single image into multiple RGBA layers with clean alpha, soft edges, and correct occlusion order. Ready-to-use REST inference API with fast response, no cold starts, and affordable pricing.
Features
qwen-image/layered (Image-to-RGBA Layers)
qwen-image/layered is a layered image decomposition model that splits a single image into multiple clean RGBA layers, enabling flexible compositing, background separation, and layer-based creative editing. It supports an optional prompt for better semantic separation and explicit control over the number of output layers.
🌟 Why it stands out
- Controllable layer count: choose exactly how many RGBA layers you want via num_layers.
- Clean RGBA outputs: each layer includes transparency for easy compositing and editing.
- Prompt-guided separation: optionally describe the scene to improve layer grouping in complex images.
- Workflow-friendly: ideal for design iteration, asset cleanup, and creative pipelines.
⚙️ Capabilities
- Image-to-multi-layer RGBA decomposition
- Transparent background handling per layer (RGBA output)
- Optional prompt conditioning for semantic grouping
- Works best on images with clear subjects, strong contrast, and limited heavy occlusion
⚙️ Parameters
| Parameter | Description |
|---|---|
| image* | Input image file or public URL. |
| prompt | Optional caption to guide layer separation (e.g., “a person in front of a building”). |
| num_layers | Number of RGBA layers to generate (e.g., 4). |
💰 Pricing
Reference table:
| num_layers | Total Price |
|---|---|
| 1 | $0.05 |
| 2 | $0.10 |
| 3 | $0.15 |
| 4 | $0.20 |
| 5 | $0.25 |
| 8 | $0.40 |
How to use
- Upload the source image (or provide a public URL).
- Set num_layers to the number of layers you want.
- Optional: add a prompt to improve semantic separation.
- Run the model.
- Download the RGBA layers and composite/edit them in your workflow.
💡 Best Use Cases
- Layer-based editing and compositing workflows
- Background separation and subject isolation
- Poster / banner / creative layout design
- Rapid asset preparation for marketing and social creatives
📝 Notes
- Best results: clear subjects, good lighting, minimal motion blur, and strong foreground/background separation.
- Higher num_layers can help break complex scenes into smaller components, but may also create finer splits that require selection/merging in post.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/qwen-image/layered" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"num_layers": 4,
"enable_sync_mode": false,
"enable_base64_output": false
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| image | string | Yes | - | The image to decompose into layers. | |
| prompt | string | No | - | A text description of the image content. | |
| num_layers | integer | No | 4 | 1 ~ 8 | The number of layers to generate (1-8). |
| enable_sync_mode | boolean | No | false | - | If set to true, the function will wait for the result to be generated before returning the response. This property is only available through the API. |
| enable_base64_output | boolean | No | false | - | If enabled, the output will be encoded into a BASE64 string instead of a URL. This property is only available through the API. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated layer images (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |