提交 Seedream 5.5 图层拆分 任务
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "bytedance/seedream-v5.5/layerize",
"input": {
"prompt": "Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"
],
"max_images": 8,
"resolution": "1K",
"output_format": "png",
"text_recognition": true
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "bytedance/seedream-v5.5/layerize",
"input": {
"prompt": "Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.",
"image_urls": ["https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"],
"max_images": 8,
"resolution": "1K",
"output_format": "png",
"text_recognition": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'bytedance/seedream-v5.5/layerize',
input: {
prompt: 'Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.',
image_urls: [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png'
],
max_images: 8,
resolution: '1K',
output_format: 'png',
text_recognition: true
}
})
};
fetch('https://api.vidgo.ai/api/generate/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vidgo.ai/api/generate/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'bytedance/seedream-v5.5/layerize',
'input' => [
'prompt' => 'Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.',
'image_urls' => [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png'
],
'max_images' => 8,
'resolution' => '1K',
'output_format' => 'png',
'text_recognition' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vidgo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"bytedance/seedream-v5.5/layerize\",\n \"input\": {\n \"prompt\": \"Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"max_images\": 8,\n \"resolution\": \"1K\",\n \"output_format\": \"png\",\n \"text_recognition\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vidgo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"bytedance/seedream-v5.5/layerize\",\n \"input\": {\n \"prompt\": \"Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"max_images\": 8,\n \"resolution\": \"1K\",\n \"output_format\": \"png\",\n \"text_recognition\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidgo.ai/api/generate/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"bytedance/seedream-v5.5/layerize\",\n \"input\": {\n \"prompt\": \"Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"max_images\": 8,\n \"resolution\": \"1K\",\n \"output_format\": \"png\",\n \"text_recognition\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "JTQCYR7TANN6PAZZ",
"status": "not_started",
"created_time": "2026-11-25T11:13:00"
}
}{
"detail": "image_urls must contain exactly 1 item"
}{
"detail": "image_urls must contain exactly 1 item"
}Seedream
Seedream 5.5 图层拆分
Seedream 5.5 图层拆分 API 把一张图片拆成 2–100 个独立图层图片,每个图层附带位置和名称信息,可选 OCR 文字。
POST
/
api
/
generate
/
submit
提交 Seedream 5.5 图层拆分 任务
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "bytedance/seedream-v5.5/layerize",
"input": {
"prompt": "Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"
],
"max_images": 8,
"resolution": "1K",
"output_format": "png",
"text_recognition": true
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "bytedance/seedream-v5.5/layerize",
"input": {
"prompt": "Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.",
"image_urls": ["https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"],
"max_images": 8,
"resolution": "1K",
"output_format": "png",
"text_recognition": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'bytedance/seedream-v5.5/layerize',
input: {
prompt: 'Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.',
image_urls: [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png'
],
max_images: 8,
resolution: '1K',
output_format: 'png',
text_recognition: true
}
})
};
fetch('https://api.vidgo.ai/api/generate/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vidgo.ai/api/generate/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'bytedance/seedream-v5.5/layerize',
'input' => [
'prompt' => 'Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.',
'image_urls' => [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png'
],
'max_images' => 8,
'resolution' => '1K',
'output_format' => 'png',
'text_recognition' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vidgo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"bytedance/seedream-v5.5/layerize\",\n \"input\": {\n \"prompt\": \"Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"max_images\": 8,\n \"resolution\": \"1K\",\n \"output_format\": \"png\",\n \"text_recognition\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vidgo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"bytedance/seedream-v5.5/layerize\",\n \"input\": {\n \"prompt\": \"Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"max_images\": 8,\n \"resolution\": \"1K\",\n \"output_format\": \"png\",\n \"text_recognition\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidgo.ai/api/generate/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"bytedance/seedream-v5.5/layerize\",\n \"input\": {\n \"prompt\": \"Separate the foreground passengers, station attendant, bench, window, wall sign text, and background into editable layers.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"max_images\": 8,\n \"resolution\": \"1K\",\n \"output_format\": \"png\",\n \"text_recognition\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "JTQCYR7TANN6PAZZ",
"status": "not_started",
"created_time": "2026-11-25T11:13:00"
}
}{
"detail": "image_urls must contain exactly 1 item"
}{
"detail": "image_urls must contain exactly 1 item"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
text_recognition 还能得到文字图层的识别文本。
Seedream 5.5 是字节跳动的图像模型。Vidgo 提供三个模型 ID:文生图、图像编辑和图层拆分。
模型
- bytedance/seedream-v5.5/layerize — Seedream 5.5 图层拆分,输入一张图片,输出 2–100 张图片。
功能
- 把一张图片拆成 2–100 张图片:一张底图加多个独立图层。
- 每个图层的元信息:
files[].layer中的位置和图层名称。 - 用
text_recognition为文字图层做 OCR 识别。 - 可用提示词指定要拆分的元素。
必填参数
image_urls(string[]):恰好一个公开的 HTTP(S) 图片 URL。
可选参数
prompt(string):说明要拆分出哪些元素,最多 2,000 个字符。resolution(string):auto、1K、1.5K或2K。默认auto。max_images(integer):返回图片数量上限(包含底图),2–100。默认30。output_format(string):png或jpeg。默认png。text_recognition(boolean):把识别出的文字写入文字图层的元信息。默认false。enable_safety_checker(boolean):默认true。
输出
任务完成后,查询任务状态接口和回调内容的files 数组中分别返回底图和各个图层。每一项除 file_url 和 file_type 外,还带有 layer 对象,包含该图层的位置和名称;text_recognition 为 true 时还包含识别文本。返回的图层数量由模型决定,最多 max_images 张。
示例
- 场景拆分并识别文字:把火车站候车室图片中的乘客、站务员、长椅、窗户、墙上标牌和背景拆成图层,
max_images: 8,1K,text_recognition: true;该任务返回了 6 张图片 (结果)。
注意事项
model和callback_url放在请求根级,与input并列。input接收上文列出的字段,其他字段返回 400。- 积分在提交时按
max_images张图片、以resolution对应费率预扣(auto按 2K 费率),另加输入图片的费用。返回图片少于max_images时,任务完成后退还差额。任务失败全额退还。当前费率见定价页。
请求体
application/json