All models
ByteDance
Image
Available
Seedream 5.0 Flash Layer Decomposition
Layer decomposition with Seedream 5.0 Flash: split an image into a base image and separate layers.
Text to Image
From 60 credits (≈ ₹60.00) per request.
Parameters
| Parameter | Type | Description |
|---|---|---|
prompt |
string | 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 `x1 y1 x2 y2` to precisely specify element positions, recommending the use of normalized coordinates in the 0-1000 range - Length: 4–5000 characters max length 5000 |
image_urlRequired |
string | 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 format: uri |
size |
string | Resolution level of the output image. The base image maintains the aspect ratio of the input image, and each separated layer maintains the aspect ratio of the corresponding element in the original image. - `auto`: Automatically selected based on the input image size - `1K`: 1K resolution level - `1.5K`: 1.5K resolution level - `2K`: 2K resolution level one of: "auto", "1K", "1.5K", "2K" · default "auto" |
output_format |
string | Output format of the base image. This parameter only controls the base image format; all separated layers are fixed to output as PNG. one of: "png", "jpeg" · default "jpeg" |
What you get back
Files arrive in output.files[] as private links that expire, with their type and size.
Use it from your code
# 1. Create the task
curl https://nexus.promptscenes.in/api/v1/tasks \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "seedream-5.0-flash-layer-decomposition",
"input": {
"image_url": "https://example.com/input.png",
"size": "auto",
"output_format": "jpeg"
},
"callback_url": "https://your-app.com/webhooks/nexus"
}'
# 2. Poll for the result
curl https://nexus.promptscenes.in/api/v1/tasks/TASK_ID \
-H "Authorization: Bearer $NEXUS_API_KEY"
import os, time, uuid, requests
API = "https://nexus.promptscenes.in/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['NEXUS_API_KEY']}"}
task = requests.post(
f"{API}/tasks",
headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
json={
"model": "seedream-5.0-flash-layer-decomposition",
"input": {
"image_url": "https://example.com/input.png",
"size": "auto",
"output_format": "jpeg",
},
"callback_url": "https://your-app.com/webhooks/nexus",
},
).json()
while task["status"] not in ("succeeded", "failed", "cancelled"):
time.sleep(3)
task = requests.get(f"{API}/tasks/{task['id']}", headers=HEADERS).json()
print(task["status"], task.get("output"))
const API = "https://nexus.promptscenes.in/api/v1";
const headers = {
Authorization: `Bearer ${process.env.NEXUS_API_KEY}`,
"Content-Type": "application/json",
};
let task = await fetch(`${API}/tasks`, {
method: "POST",
headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({
"model": "seedream-5.0-flash-layer-decomposition",
"input": {
"image_url": "https://example.com/input.png",
"size": "auto",
"output_format": "jpeg"
},
"callback_url": "https://your-app.com/webhooks/nexus"
}),
}).then((r) => r.json());
while (!["succeeded", "failed", "cancelled"].includes(task.status)) {
await new Promise((r) => setTimeout(r, 3000));
task = await fetch(`${API}/tasks/${task.id}`, { headers }).then((r) => r.json());
}
console.log(task.status, task.output);
Request
{
"model": "seedream-5.0-flash-layer-decomposition",
"input": {
"image_url": "https://example.com/input.png",
"size": "auto",
"output_format": "jpeg"
}
}
Response
{
"id": "6f1c…",
"object": "task",
"model": "seedream-5.0-flash-layer-decomposition",
"status": "succeeded",
"output": {
"files": [
{
"url": "https://…signed…",
"mime": "…",
"size": 0
}
]
},
"estimated_cost": "…",
"charged": "…"
}