VIDU 首尾帧生成视频
⚠️ 测试中
▼
Authorization
在 Header 添加参数 Authorization,其值为 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
请求参数
Header 参数
Authorization
string
可选
示例: Bearer {{YOUR_API_KEY}}
Content-Type
string
可选
示例: application/json
Body 参数 application/json
model
string
必需
模型名称。可选值:viduq2、viduq1、viduq3-turbo、viduq3-pro
images
array[object]
必需
首尾帧图片。首帧图和尾帧图两张图片,比例需相近
prompt
string
必需
文本提示词,生成视频的文本描述。字符长度不能超过 2000 个字符
duration
integer
可选
视频时长参数,默认值依据模型而定
seed
string
可选
随机种子。当默认不传或传0时,会使用随机数替代
resolution
string
可选
分辨率参数,默认值依据模型和视频时长而定
watermark
string
可选
是否添加水印。true:添加水印;false:不添加水印
callback_url
string
可选
Callback 协议,任务状态变化时发送回调请求
示例
{
"model": "viduq1",
"images": [
"https://storage.xuanxu.net/images/1997560136907759618/1768223244152.png",
"https://storage.xuanxu.net/images/1997560136907759618/1768223372503.png"
],
"prompt": "采蘑菇的小姑娘,上山采蘑菇,遇到了比自己还大的蘑菇"
}
请求示例代码
curl --location --request POST 'https://api.quickrouter.ai/vidu/start-end2video' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{
"model": "viduq1",
"images": [
"https://storage.xuanxu.net/images/1997560136907759618/1768223244152.png",
"https://storage.xuanxu.net/images/1997560136907759618/1768223372503.png"
],
"prompt": "采蘑菇的小姑娘,上山采蘑菇,遇到了比自己还大的蘑菇"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"model": "viduq1",
"images": [
"https://storage.xuanxu.net/images/1997560136907759618/1768223244152.png",
"https://storage.xuanxu.net/images/1997560136907759618/1768223372503.png"
],
"prompt": "采蘑菇的小姑娘,上山采蘑菇,遇到了比自己还大的蘑菇"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.quickrouter.ai/vidu/start-end2video", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import http.client
import json
conn = http.client.HTTPSConnection("api.quickrouter.ai")
payload = json.dumps({
"model": "viduq1",
"images": [
"https://storage.xuanxu.net/images/1997560136907759618/1768223244152.png",
"https://storage.xuanxu.net/images/1997560136907759618/1768223372503.png"
],
"prompt": "采蘑菇的小姑娘,上山采蘑菇,遇到了比自己还大的蘑菇"
})
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
conn.request("POST", "/vidu/start-end2video", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
返回响应
响应参数 application/json
task_id
string
可选
任务ID
base_resp
object
可选
基本响应
示例
{
"task_id": "911088422699962368",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}