Seedream5.5 - Layer Decomposition
This reference documents the ModelFold gateway.
Endpoint
POST /images/generations
Full URL: https://modelfold.ai/v1/images/generations
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Input parameters for the layer decomposition task
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name used to execute the layer decomposition task. Required field. - Must be seedream/5-5-layer-decomposition for this endpoint Default:"seedream/5-5-layer-decomposition"。 Allowed values:seedream/5-5-layer-decomposition。 Example:seedream/5-5-layer-decomposition。 |
image_url | string | Yes | Required. URL of the image to decompose. - Exactly 1 image, publicly accessible URL - Supported formats: JPEG, PNG, WEBP - Max 10 MB Example: https://modelfold.ai/examples/seedream-5-5/1794318739537_P4dNQrYe.png。 |
prompt | string | No | Optional. At most 2000 characters. Optional. Describes which elements to separate, 0–2000 characters. - When provided, the model separates the described elements - When empty, the model identifies the main elements automatically - You can use <bbox>x1 y1 x2 y2</bbox> to mark element positions, with coordinates normalized to 0–1000 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。 |
size | string | No | Output size: auto, 1K, 1.5K or 2K. Default auto. auto or omitted keeps the input size, clamped to 1K–2K. |
max_images | integer | No | Number of outputs, 2–100. Default 30 (one base image plus layers). The example uses 2. |
output_format | string | No | Format of the base image. Defaults to png. Only affects the base image; separated layers are always PNG (transparent background). Default:"png"。 Allowed values:png / jpeg。 Example:png。 |
text_recognition | boolean | No | Whether to recognize text in the layers. Defaults to false. Default:false。 Example:false。 |
nsfw_checker | boolean | No | Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model. |
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-5-layer-decomposition",
"image_url": "https://modelfold.ai/examples/seedream-5-5/1794318739537_P4dNQrYe.png",
"prompt": "Separate the title text <bbox>179 58 809 197</bbox> and the parrot <bbox>330 274 641 991</bbox> into independent layers",
"size": "1K",
"output_format": "png",
"max_images": 2,
"text_recognition": false
}'json
{
"model": "seedream/5-5-layer-decomposition",
"image_url": "https://modelfold.ai/examples/seedream-5-5/1794318739537_P4dNQrYe.png",
"prompt": "Separate the title text <bbox>179 58 809 197</bbox> and the parrot <bbox>330 274 641 991</bbox> into independent layers",
"size": "1K",
"output_format": "png",
"max_images": 2,
"text_recognition": false
}Response
json
{
"ok": true,
"created": 1792134000,
"data": [
{
"url": "https://modelfold.ai/uploads/outputs/result.png"
}
],
"usage": {}
}