提交 Seedream 5.0 Flash 图像编辑任务
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.0-flash/edit",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Keep the product and replace the background with a bright studio.",
"size": "1:1",
"resolution": "1K",
"image_urls": [
"https://cdn.vidgo.ai/temp/reference-product.png"
]
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "bytedance/seedream-v5.0-flash/edit",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Keep the product and replace the background with a bright studio.",
"size": "1:1",
"resolution": "1K",
"image_urls": ["https://cdn.vidgo.ai/temp/reference-product.png"]
}
}
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.0-flash/edit',
callback_url: 'https://your-domain.com/callback',
input: {
prompt: 'Keep the product and replace the background with a bright studio.',
size: '1:1',
resolution: '1K',
image_urls: ['https://cdn.vidgo.ai/temp/reference-product.png']
}
})
};
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.0-flash/edit',
'callback_url' => 'https://your-domain.com/callback',
'input' => [
'prompt' => 'Keep the product and replace the background with a bright studio.',
'size' => '1:1',
'resolution' => '1K',
'image_urls' => [
'https://cdn.vidgo.ai/temp/reference-product.png'
]
]
]),
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.0-flash/edit\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"Keep the product and replace the background with a bright studio.\",\n \"size\": \"1:1\",\n \"resolution\": \"1K\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-product.png\"\n ]\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.0-flash/edit\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"Keep the product and replace the background with a bright studio.\",\n \"size\": \"1:1\",\n \"resolution\": \"1K\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-product.png\"\n ]\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.0-flash/edit\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"Keep the product and replace the background with a bright studio.\",\n \"size\": \"1:1\",\n \"resolution\": \"1K\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-product.png\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "running",
"created_time": "2026-10-09T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}Seedream
Seedream 5.0 Flash 图像编辑
Seedream 5.0 Flash 图像编辑 API 通过文字指令和参考图编辑一张图像。
POST
/
api
/
generate
/
submit
提交 Seedream 5.0 Flash 图像编辑任务
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.0-flash/edit",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Keep the product and replace the background with a bright studio.",
"size": "1:1",
"resolution": "1K",
"image_urls": [
"https://cdn.vidgo.ai/temp/reference-product.png"
]
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "bytedance/seedream-v5.0-flash/edit",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Keep the product and replace the background with a bright studio.",
"size": "1:1",
"resolution": "1K",
"image_urls": ["https://cdn.vidgo.ai/temp/reference-product.png"]
}
}
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.0-flash/edit',
callback_url: 'https://your-domain.com/callback',
input: {
prompt: 'Keep the product and replace the background with a bright studio.',
size: '1:1',
resolution: '1K',
image_urls: ['https://cdn.vidgo.ai/temp/reference-product.png']
}
})
};
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.0-flash/edit',
'callback_url' => 'https://your-domain.com/callback',
'input' => [
'prompt' => 'Keep the product and replace the background with a bright studio.',
'size' => '1:1',
'resolution' => '1K',
'image_urls' => [
'https://cdn.vidgo.ai/temp/reference-product.png'
]
]
]),
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.0-flash/edit\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"Keep the product and replace the background with a bright studio.\",\n \"size\": \"1:1\",\n \"resolution\": \"1K\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-product.png\"\n ]\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.0-flash/edit\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"Keep the product and replace the background with a bright studio.\",\n \"size\": \"1:1\",\n \"resolution\": \"1K\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-product.png\"\n ]\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.0-flash/edit\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"Keep the product and replace the background with a bright studio.\",\n \"size\": \"1:1\",\n \"resolution\": \"1K\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-product.png\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "running",
"created_time": "2026-10-09T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
可选参数
size(string):输出宽高比。可选值:1:1、4:3、3:4、16:9、9:16、2:3、3:2、21:9。默认:1:1。resolution(string):输出分辨率档位。可选值:1K、1.5K、2K。默认:1K。output_format(string):输出图像格式。可选值:jpeg、png。省略时由模型选择格式。enable_safety_checker(boolean):开启内容安全检查。默认:true。
使用指南
使用 Seedream 5.0 Flash,通过文字指令和参考图编辑一张图像。- 将
model设为bytedance/seedream-v5.0-flash/edit。 model和可选的callback_url放在请求根级;工作流参数放在input内。- 每次请求生成一张图像。
- 如只需根据提示词生成,请使用文生图,并设置
model=bytedance/seedream-v5.0-flash/text-to-image。
参数详情
prompt必填。提供非空文本,最多 5,000 个字符。image_urls必填,接受 1 到 10 个参考图 URL。使用公开可访问的 HTTP(S) URL,顺序与提示词中引用参考图的顺序一致。
计费
按输出图像计费。在所有支持的分辨率档位上,文生图和图像编辑的计费标准相同。 积分在提交时扣除,任务失败会退还。授权
使用 Authorization: Bearer VIDGO_API_KEY。
请求体
application/json