Seedream5.0 Pro - Layer Decomposition
Endpoint
POST /images/generations
Full URL: https://modelfold.ai/v1/images/generations
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.
Input parameters for the layer separation task
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name used to execute the layer separation task. Required field. - Must be seedream/5-pro-layer-decomposition for this endpoint Default:"seedream/5-pro-layer-decomposition"。 Allowed values:seedream/5-pro-layer-decomposition。 Example:seedream/5-pro-layer-decomposition。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. Optional prompt for layer separation. - When a prompt is provided, the model separates the specified elements based on the prompt - When no prompt is provided, the model automatically identifies the main elements in the image - Supports using <bbox>x1 y1 x2 y2</bbox> to precisely specify element positions, recommending the use of normalized coordinates in the 0-1000 range minLength: 0. maxLength: 2000. Example:Separate the title text <bbox>179 58 809 197</bbox> and the parrot <bbox>330 274 641 991</bbox> into independent layers。 |
image_url | string | Yes | The source image URL for layer separation. - Must upload exactly 1 image - Supported formats: PNG, JPEG. - Image size must not exceed 30 MB - Total pixel range is 262,144-36,000,000 - Aspect ratio range is 1:16-16:1 Example: https://static.aiquickdraw.com/tools/example/1786019968051_cKRYLHHu.png。 |
size | string | Yes | Required. Output resolution tier: auto, 1K, 1.5K or 2K. auto follows the input image size. Allowed values:auto / 1K / 1.5K / 2K。 Example:2K。 |
output_format | string | No | Output format of the base image. This parameter only controls the base image format; all separated layers are fixed to output as PNG. Default:"jpeg"。 Allowed values:png / jpeg。 Example:jpeg。 |
Request Example
bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream/5-pro-layer-decomposition",
"image_url": "https://static.aiquickdraw.com/tools/example/1786019968051_cKRYLHHu.png",
"size": "2K",
"prompt": "Separate the title text <bbox>179 58 809 197</bbox> and the parrot <bbox>330 274 641 991</bbox> into independent layers",
"output_format": "jpeg"
}'json
{
"model": "seedream/5-pro-layer-decomposition",
"image_url": "https://static.aiquickdraw.com/tools/example/1786019968051_cKRYLHHu.png",
"size": "2K",
"prompt": "Separate the title text <bbox>179 58 809 197</bbox> and the parrot <bbox>330 274 641 991</bbox> into independent layers",
"output_format": "jpeg"
}Response
200 — Generation completed. usage contains actual billing details; result URLs are illustrative.
json
{
"ok": true,
"created": 1792134000,
"data": [
{
"url": "https://modelfold.ai/uploads/outputs/result.png"
}
],
"usage": {}
}