curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedream-5.0-flash-layerize",
"image_urls": [
"https://example.com/poster.png"
],
"quality": "auto",
"output_format": "jpeg"
}
'{
"created": 1757165031,
"id": "task-unified-1757165031-seedream5flashlayerize",
"model": "doubao-seedream-5.0-flash-layerize",
"object": "image.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 60
},
"type": "image",
"usage": {
"billing_rule": "per_image",
"credits_reserved": 18.7272,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: doubao-seedream-5.0-flash-layerize",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Seedream 5.0 Flash Layer Decomposition
- Seedream 5.0 Flash Layer Decomposition (doubao-seedream-5.0-flash-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 - Billed per image: the base image and each layer count as one image at the same price, regardless of resolution tier; the input image is free. Credits for up to
17images are reserved when the task is created, then settled against the actual output count on completion; any excess reserved credits are automatically returned - Estimated processing time: about
60seconds - Generated image links are valid for 24 hours, please save them promptly
curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedream-5.0-flash-layerize",
"image_urls": [
"https://example.com/poster.png"
],
"quality": "auto",
"output_format": "jpeg"
}
'{
"created": 1757165031,
"id": "task-unified-1757165031-seedream5flashlayerize",
"model": "doubao-seedream-5.0-flash-layerize",
"object": "image.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 60
},
"type": "image",
"usage": {
"billing_rule": "per_image",
"credits_reserved": 18.7272,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: doubao-seedream-5.0-flash-layerize",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Image generation model name
doubao-seedream-5.0-flash-layerize "doubao-seedream-5.0-flash-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 element["https://example.com/poster.png"]
Which 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
"Separate 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: Billed per image regardless of resolution tier; 1K, 1.5K, 2K, and auto cost the same.
auto, 1K, 1.5K, 2K "auto"
Prompt optimization strategy, used to set the prompt optimization mode
Options:
standard: Standard mode
Note: Seedream 5.0 Flash only supports standard; passing fast returns 400. Flash already provides faster generation and does not offer a separate fast mode.
standard "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-seedream5flashlayerize"
Actual model name used
"doubao-seedream-5.0-flash-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
Show child attributes
Show child attributes
Task output type
text, image, audio, video "image"
Usage and billing information
Show child attributes
Show child attributes