Seedream 5.0 Pro 图层分解

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

将单张图片分解为基础图和最多 16 个图层。官方单价:每张不超过 261 万像素 $0.0225,超过则 $0.045;按各张输出实际尺寸计费。

示例

Seedream 5.0 Pro 图层分解 示例 1

参数

名称类型默认约束说明
image *图片image_upload—image/* · 1–1 items要分解为图层的图片。
prompt提示词textarea—≤ 5000 chars用于生成的正向提示词。
size分辨率select1K1K | 1.5K | 2K生成媒体的像素尺寸。
output_format输出格式selectpngjpeg | png输出图片的格式。
optimize_prompt_options提示词优化模式selectstandardstandard | fast提示词优化模式。模型会在生成前重写你的提示词。“standard”会进行完整重写;“fast”会采用更轻量的重写,生成速度可快数倍,但对较长或复杂提示词的遵循度较低,且仅由支持该模式的上游服务提供,因此故障切换能力较弱。

输出字段

字段类型说明
imagesarray<string>
layersarray<object>

API

通过统一 REST API 调用本模型;在 API Keys 页获取密钥。

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);

文档

Seedream 5.0 Pro 图层分解

将单张图片分解为基础图和最多 16 个图层。官方单价:每张不超过 261 万像素 $0.0225,超过则 $0.045;按各张输出实际尺寸计费。

价格

与 BytePlus 官方原厂标价一致。每张成功输出(包括基础图)分别按实际宽 × 高计费,同一次返回可以包含不同档位。唯一一张输入图免费;1 美元 = 100 积分。账户折扣另行计算。

输出实际像素数美元 / 张积分 / 张
≤ 2,610,000$0.02252.25
> 2,610,000$0.0454.5

提交时 Nami 预扣 76.5 积分($0.765),覆盖最多 17 张输出(1 张基础图 + 最多 16 个图层)全部按高档计算的上限。完成后按 低档张数 × 2.25 + 高档张数 × 4.5 积分结算并退回差额。例如 1 张 2K 基础图和 5 张不超过阈值的图层共收 15.75 积分($0.1575)。模型列表显示 每张 $0.0225 起;请求报价显示最大预扣额。不能仅凭请求的 size 判定所有图层的最终费用。失败任务退费。

BytePlus

参数

image 必须是恰好包含一个可访问图片 URL 的数组。prompt 可选,最多 5,000 字符。size 支持 1K、1.5K、2K,Nami 默认 1K。需要透明图层时使用默认 png;JPEG 不保留透明通道。optimize_prompt_options 支持 standard(默认)或 fast。图层数量由模型决定,没有 num_layers 或 num_images 参数。此入口的尺寸选项不包含 auto、任意像素尺寸、单独的 resolution 或 aspect_ratio。

参数必填默认值 / 限制
image是1 URL
prompt否5,000
size否1K / 1.5K / 2K; 默认值: 1K
output_format否jpeg / png; 默认值: png
optimize_prompt_options否standard / fast; 默认值: standard

调用示例

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"

返回结果

提交后返回 task_uuid 和 status。使用同一 API Key 轮询,直到 completed 或 failed。output.images 为图片 URL 数组;output.layers 包含基础图和各图层对象,每项带 url、size(宽x高),以及可能存在的 z_index、name、description、bounding_box 等元数据。两者描述同一批输出,计费不能重复相加。cost_credits 的单位是积分,结算尚未完成时可能仍显示预扣额。请将公开示例图片替换为您自己的可访问图片 URL。

相关模型

xAI Grok Imagine Image v2.0 图片编辑
图生图X Ai

xAI Grok Imagine Image v2.0 图片编辑

xAI Grok Imagine Image V2.0 Edit 可根据文本提示词对输入图片进行编辑,并支持可配置的分辨率和质量,适用于精细图片编辑、视觉优化、创意变体、社交内容、营销素材和生产工作流。提供开箱即用的 REST 推理 API,性能出色,无冷启动,价格实惠。

起 $0.090 / 每次
qwen-image-edit-spicy
图生图

qwen-image-edit-spicy

通过文本指令精确编辑图片,可添加、移除或修改画面元素,也支持风格迁移和背景替换,适合照片修饰与视觉设计。

起 $0.034 / 每次
Qwen Image 3.0 Pro Edit|快速图片编辑
图生图Qwen Image 3.0 Pro

Qwen Image 3.0 Pro Edit|快速图片编辑

Qwen Image 3.0 Pro Edit 是一款专业级图片编辑模型,具备出色的画质和高级指令理解能力。最高支持 2k。提供开箱即用的 REST inference API,性能优异,无冷启动,价格实惠。

起 $0.0663 / 每次
OpenAI GPT Image 2.5 Sunburst 图像编辑
图生图OpenAI

OpenAI GPT Image 2.5 Sunburst 图像编辑

使用最多 16 张参考图片完成高保真、精确的图像编辑。

起 $0.220 / 每次
OpenAI GPT Image 2.5 Flare 图像编辑
图生图OpenAI

OpenAI GPT Image 2.5 Flare 图像编辑

使用自然语言指令和最多 16 张参考图片进行快速、均衡的图像编辑。

起 $0.220 / 每次
图生图
图生图NamiFusion

图片换头

将照片中的人物头部替换为参考图中的头部。先上传目标照片,再上传头部参考图。

起 $0.220 / 每次
Nano Banana 图像编辑
图生图Google

Nano Banana 图像编辑

高性价比智能修图。 无需蒙版即可实现物体替换与风格迁移,极速响应,成本低廉。

起 $0.038 / 每次
Nano Banana Pro 图像编辑
图生图Google

Nano Banana Pro 图像编辑

4K 语义级修图。基于自然语言修改现有图像,支持智能光影融合与图像内多语言文字编辑。

起 $0.140 / 每次