Seedream 5.0 Pro Layer Decomposition

doubao/seedream-v5.0-pro/layer-decomposition

Decompose one image into a base image and up to 16 layers. Official pricing per output: $0.0225 at up to 2.61 million pixels; $0.045 above. Each image is billed by its actual size.

Examples

Seedream 5.0 Pro Layer Decomposition Examples 1

Parameters

NameTypeDefaultConstraintsDescription
image *Imageimage_upload—image/* · 1–1 itemsThe image to decompose into layers.
promptPrompttextarea—≤ 5000 charsThe positive prompt for the generation.
sizesizeselect1K1K | 1.5K | 2KThe size of the generated media in pixels
output_formatOutput Formatselectpngjpeg | pngThe format of the output image.
optimize_prompt_optionsPrompt Optimization Modeselectstandardstandard | fastPrompt optimization mode. The model rewrites your prompt before generating. 'standard' uses the full rewrite; 'fast' uses a lighter one that generates several times quicker but follows long or intricate prompts less closely, and is served only by the upstream providers that honour it, so it has less failover depth.

Output fields

FieldTypeDescription
imagesarray<string>Output image URLs, including the base image.
layersarray<object>Base and layer metadata, including url and actual WIDTHxHEIGHT size.

API

Call this model through one unified REST API. Get a key on the API Keys page.

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/doubao/seedream-v5.0-pro/layer-decomposition" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": [
      "https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/09/24/eef493b64b3b.jpeg"
    ],
    "prompt": "Decompose the image into clean, editable transparent layers with accurate object boundaries, preserving fine details and shadows where appropriate.",
    "size": "1K",
    "output_format": "png",
    "optimize_prompt_options": "standard"
  }
}'

# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import time, requests

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1) Submit
resp = requests.post(
    "https://www.namifusion.com/api/v1/marketplace/run/doubao/seedream-v5.0-pro/layer-decomposition",
    headers=HEADERS,
    json={
        "input": {
            "image": [
                "https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/09/24/eef493b64b3b.jpeg"
            ],
            "prompt": "Decompose the image into clean, editable transparent layers with accurate object boundaries, preserving fine details and shadows where appropriate.",
            "size": "1K",
            "output_format": "png",
            "optimize_prompt_options": "standard"
        }
    },
)
resp.raise_for_status()  # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()

# 2) Poll until a terminal state (completed / failed / cancelled).
#    This model is allowed up to 300s server-side.
deadline = time.time() + 360
while task.get("status") not in ("completed", "failed", "cancelled"):
    if time.time() > deadline:
        raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
    time.sleep(3)
    poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
    poll.raise_for_status()
    task = poll.json()

print(task["status"], task.get("output"))
JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };

// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/doubao/seedream-v5.0-pro/layer-decomposition", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "image": [
        "https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/09/24/eef493b64b3b.jpeg"
      ],
      "prompt": "Decompose the image into clean, editable transparent layers with accurate object boundaries, preserving fine details and shadows where appropriate.",
      "size": "1K",
      "output_format": "png",
      "optimize_prompt_options": "standard"
    }
  }),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();

// 2) Poll until a terminal state (completed / failed / cancelled).
//    This model is allowed up to 300s server-side.
const deadline = Date.now() + 360 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
  if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
  await new Promise((r) => setTimeout(r, 3000));
  const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
  if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
  task = await poll.json();
}

console.log(task.status, task.output);

Documentation

Seedream 5.0 Pro Layer Decomposition

Decompose one image into a base image and up to 16 layers. Official pricing per output: $0.0225 at up to 2.61 million pixels; $0.045 above. Each image is billed by its actual size.

Pricing

Matches the BytePlus official list price. Each successfully returned image is billed separately by its actual width × height, including the base image. A single response can contain both tiers. The one input image is free; USD 1 = 100 credits. Account discounts apply separately.

Actual output pixelsUSD / imageCredits / image
≤ 2,610,000$0.02252.25
> 2,610,000$0.0454.5

At submission, Nami precharges 76.5 credits ($0.765), covering the maximum of 17 outputs at the higher rate (one base image and up to 16 layers). After completion it settles low-tier count × 2.25 + high-tier count × 4.5 credits and returns the unused precharge. Example: one 2K base image and five layers below the threshold cost 15.75 credits ($0.1575). The model listing starts at $0.0225 per image; the request quote is the maximum precharge. The requested size alone does not determine the final charge. Failed tasks are refunded.

BytePlus

Parameters

image must be an array containing exactly one accessible image URL. prompt is optional (maximum 5,000 characters). size accepts 1K, 1.5K, or 2K; Nami defaults to 1K. Use png (default) when you need transparency; JPEG cannot retain an alpha channel. optimize_prompt_options accepts standard (default) or fast. The model determines the layer count; there is no num_layers or num_images input. This endpoint does not accept auto, arbitrary pixel dimensions, separate resolution, or aspect_ratio as documented size controls.

ParametersRequiredDefault / limits
imageYes1 URL
promptNo5,000
sizeNo1K / 1.5K / 2K; Default: 1K
output_formatNojpeg / png; Default: png
optimize_prompt_optionsNostandard / fast; Default: standard

Example

curl -X POST 'https://www.namifusion.com/api/v1/marketplace/run/doubao/seedream-v5.0-pro/layer-decomposition' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "image": [
      "https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/09/24/eef493b64b3b.jpeg"
    ],
    "prompt": "Decompose the image into clean, editable transparent layers with accurate object boundaries, preserving fine details and shadows where appropriate.",
    "size": "1K",
    "output_format": "png",
    "optimize_prompt_options": "standard"
  }
}'
curl 'https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID' \
  -H "Authorization: Bearer $API_KEY"

Response

Submission returns task_uuid and status. Poll with the same API key until completed or failed. output.images contains the image URLs; output.layers contains the base and layer objects, each with url and size (WIDTHxHEIGHT) and optional layer metadata such as z_index, name, description, and bounding_box. These are two representations of the same outputs and must not be added together for billing. cost_credits is denominated in credits and can still show the precharge while settlement is pending. Replace the public sample image with your own accessible image URL.

Related models

xAI Grok Imagine Image v2.0 Edit
Image to ImageX Ai

xAI Grok Imagine Image v2.0 Edit

xAI Grok Imagine Image V2.0 Edit transforms input images with text prompts, with configurable resolution and quality for precise image editing, visual refinements, creative variations, social content, marketing assets, and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

from $0.090 / per run
qwen-image-edit-spicy
Image to Image

qwen-image-edit-spicy

Precisely edit images with text instructions. Add, remove, or modify visual elements, transfer styles, and replace backgrounds for photo retouching and visual design.

from $0.034 / per run
Qwen Image 3.0 Pro Edit | Fast Image Editing
Image to ImageQwen Image 3.0 Pro

Qwen Image 3.0 Pro Edit | Fast Image Editing

Qwen Image 3.0 Pro Edit is a professional-grade image editing model with superior quality and advanced instruction understanding. Up to 2k. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

from $0.0663 / per run
OpenAI GPT Image 2.5 Sunburst Edit
Image to ImageOpenAI

OpenAI GPT Image 2.5 Sunburst Edit

High-fidelity image editing for precise transformations using up to 16 reference images.

from $0.220 / per run
OpenAI GPT Image 2.5 Flare Edit
Image to ImageOpenAI

OpenAI GPT Image 2.5 Flare Edit

Fast, balanced image editing from natural-language instructions and up to 16 reference images.

from $0.220 / per run
Image to Image
Image to ImageNamiFusion

Head Swap (Image)

Swap the head in a photo with the head from a reference image. Upload the target photo first, then the head reference.

from $0.220 / per run
Nano Banana Image Edit
Image to ImageGoogle

Nano Banana Image Edit

Fast & Affordable Editing. Intuitive object replacement and style transfer without manual masking.

from $0.038 / per run
Nano Banana Pro Image Edit
Image to ImageGoogle

Nano Banana Pro Image Edit

4K Semantic Editing.Modifies existing images via natural language with context awareness and multilingual text editing.

from $0.140 / per run