提交 Seedance 2.0 图生视频任务
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.0/image-to-video",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic scene with natural lighting and coherent motion",
"duration": 5,
"resolution": "480p",
"image_urls": [
"https://cdn.vidgo.ai/temp/reference-1.jpg"
]
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "seedance-2.0/image-to-video",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic scene with natural lighting and coherent motion",
"duration": 5,
"resolution": "480p",
"image_urls": ["https://cdn.vidgo.ai/temp/reference-1.jpg"]
}
}
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: 'seedance-2.0/image-to-video',
callback_url: 'https://your-domain.com/callback',
input: {
prompt: 'A cinematic scene with natural lighting and coherent motion',
duration: 5,
resolution: '480p',
image_urls: ['https://cdn.vidgo.ai/temp/reference-1.jpg']
}
})
};
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' => 'seedance-2.0/image-to-video',
'callback_url' => 'https://your-domain.com/callback',
'input' => [
'prompt' => 'A cinematic scene with natural lighting and coherent motion',
'duration' => 5,
'resolution' => '480p',
'image_urls' => [
'https://cdn.vidgo.ai/temp/reference-1.jpg'
]
]
]),
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\": \"seedance-2.0/image-to-video\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"A cinematic scene with natural lighting and coherent motion\",\n \"duration\": 5,\n \"resolution\": \"480p\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-1.jpg\"\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\": \"seedance-2.0/image-to-video\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"A cinematic scene with natural lighting and coherent motion\",\n \"duration\": 5,\n \"resolution\": \"480p\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-1.jpg\"\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\": \"seedance-2.0/image-to-video\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"A cinematic scene with natural lighting and coherent motion\",\n \"duration\": 5,\n \"resolution\": \"480p\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-1.jpg\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "<string>",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
}
}Seedance
Seedance 2.0 图生视频
Seedance 2.0 图生视频模型,支持多模态生成和可选音频
POST
/
api
/
generate
/
submit
提交 Seedance 2.0 图生视频任务
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.0/image-to-video",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic scene with natural lighting and coherent motion",
"duration": 5,
"resolution": "480p",
"image_urls": [
"https://cdn.vidgo.ai/temp/reference-1.jpg"
]
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "seedance-2.0/image-to-video",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic scene with natural lighting and coherent motion",
"duration": 5,
"resolution": "480p",
"image_urls": ["https://cdn.vidgo.ai/temp/reference-1.jpg"]
}
}
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: 'seedance-2.0/image-to-video',
callback_url: 'https://your-domain.com/callback',
input: {
prompt: 'A cinematic scene with natural lighting and coherent motion',
duration: 5,
resolution: '480p',
image_urls: ['https://cdn.vidgo.ai/temp/reference-1.jpg']
}
})
};
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' => 'seedance-2.0/image-to-video',
'callback_url' => 'https://your-domain.com/callback',
'input' => [
'prompt' => 'A cinematic scene with natural lighting and coherent motion',
'duration' => 5,
'resolution' => '480p',
'image_urls' => [
'https://cdn.vidgo.ai/temp/reference-1.jpg'
]
]
]),
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\": \"seedance-2.0/image-to-video\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"A cinematic scene with natural lighting and coherent motion\",\n \"duration\": 5,\n \"resolution\": \"480p\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-1.jpg\"\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\": \"seedance-2.0/image-to-video\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"A cinematic scene with natural lighting and coherent motion\",\n \"duration\": 5,\n \"resolution\": \"480p\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-1.jpg\"\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\": \"seedance-2.0/image-to-video\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"prompt\": \"A cinematic scene with natural lighting and coherent motion\",\n \"duration\": 5,\n \"resolution\": \"480p\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/temp/reference-1.jpg\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "<string>",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- seedance-2.0/image-to-video - Seedance 2.0 图生视频
功能
- 图生视频:最多用两张图片控制起始帧和可选的结束帧。
- 可选音频:可请求与视频一起生成音频。
版本说明
- 该公开 model ID 使用
seedance-2服务商版本。 - 支持的分辨率为
480p、720p、1080p和4k。
积分参考
- 用量根据输出时长和所选分辨率计算。
- 提交生产流量前,请在 Vidgo 仪表盘查看该模型的当前费率。
注意事项
prompt为必填,最多 20,000 个字符。duration支持4到15的整数。image_urls接受一张起始帧和一张可选的结束帧。aspect_ratio接受auto、21:9、16:9、4:3、1:1、3:4或9:16。image_urls为必填。- 所有远程 URL 必须可公开访问且可直接下载。