Seedream 5.0 Pro Layer Decomposition
- Seedream 5.0 Pro Layer Decomposition (doubao-seedream-5.0-pro-layerize) splits one image into a base image and several independent layers; every layer is a PNG with an alpha channel, while the base image format follows
output_format - Exactly one input image is required;
promptis optional — omit it and the model automatically detects every major element in the image and splits them one by one - The number of output images is decided by the decomposition result (
1~17) and cannot be controlled by request parameters; if any layer fails the whole request fails — there is no partial success, and a failed request is fully refunded - Asynchronous processing mode, use the returned task ID to query. In the task detail, every item in
result_datacarriesz_index(stacking order:0for the base image, incrementing from1for layers); layers additionally carrybounding_box(absolutein base-image pixel coordinates,normalizedin the0~1000range),nameanddescription - This model takes longer than plain generation: about
120seconds - Generated image links are valid for 24 hours, please save them promptly
Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Body
Image generation model name
doubao-seedream-5.0-pro-layerize "doubao-seedream-5.0-pro-layerize"
URL of the image to decompose (required)
Note:
- Exactly
1image is required; omitting it or passing2or more returns an error - Supported formats:
.png,.jpeg,.jpg(stricter than plain generation — webp and others are rejected) - Image size: no more than
30MB - Total pixels:
[262144, 6000×6000], i.e. at least512×512(a higher lower bound than plain generation) - Aspect ratio (width/height) range:
[1/16, 16] - The image URL must be directly viewable by the server, or the URL must trigger a direct download when accessed (usually such URLs end with an image file extension, such as
.png,.jpg)
1 elementWhich elements to split out (optional)
Three ways to use it:
- Omit it: the model detects every major element in the image and splits them one by one
- Natural language: e.g.
Split out the parrot and the title text— elements are identified semantically and turned into layers - Exact coordinates: use
<bbox>tags to pin down a position, e.g.title text<bbox>179 58 809 197</bbox>; normalized coordinates (0~1000) are recommended
"Split out the parrot and the title text"
Output resolution tier, defaults to auto
Options: auto, 1K, 1.5K, 2K
Notes:
- Layer mode only accepts tiers; passing a ratio (such as
16:9) or explicit pixels (such as2048x2048) returns an error automakes the output follow the input image: if the original size falls within[921600, 4624220]pixels it is kept as is, below 1K it is output at 1K, above 2K it is output at 2K- Each layer keeps its own aspect ratio from the original image, and the base image keeps the aspect ratio of the input
Billing: the tier is decided per output image from its own pixel count; 1K and 1.5K cost the same, and an output image above 2610000 pixels is billed at the higher tier.
auto, 1K, 1.5K, 2K "auto"
Prompt optimization strategy, used to set the mode for prompt optimization
Options:
standard: Standard mode, higher quality output, longer processing timefast: Fast mode, shorter processing time, slightly lower quality than standard mode
standard, fast "standard"
Output image format
Options:
jpeg: JPEG format (default)png: PNG format
Note: This parameter only controls the base image. The layers are always PNG with an alpha channel and are not affected by it.
jpeg, png "jpeg"
HTTPS callback address after task completion
Callback Timing:
- Triggered when task is completed, failed, or cancelled
- Sent after billing confirmation is completed
Security Restrictions:
- Only HTTPS protocol is supported
- Callback to internal IP addresses is prohibited (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
- URL length must not exceed
2048characters
Callback Mechanism:
- Timeout:
10seconds - Maximum
3retries on failure (retries after1second/2seconds/4seconds) - Callback response body format is consistent with the task query API response format
- Callback address returning 2xx status code is considered successful, other status codes will trigger retry
"https://your-domain.com/webhooks/image-task-completed"
Response
Image generation task created successfully
Task creation timestamp
1757165031
Task ID
"task-unified-1757165031-seedream5prolayerize"
Actual model name used
"doubao-seedream-5.0-pro-layerize"
Specific task type
image.generation.task Task progress percentage (0-100)
0 <= x <= 1000
Task status
pending, processing, completed, failed "pending"
Async task information
Task output type
text, image, audio, video "image"
Usage and billing information