创建视频
curl --request POST \
--url https://www.token-nova.com/v1/video/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"images": [
{}
],
"prompt": "<string>",
"aspect_ratio": "<string>",
"audio": true,
"voice_id": "<string>",
"is_rec": true,
"bgm": true,
"duration": 123,
"seed": 123,
"resolution": "<string>",
"payload": "<string>",
"off_peak": true,
"watermark": true,
"wm_position": 123,
"wm_url": "<string>",
"meta_data": "<string>"
}
'import requests
url = "https://www.token-nova.com/v1/video/create"
payload = {
"model": "<string>",
"images": [{}],
"prompt": "<string>",
"aspect_ratio": "<string>",
"audio": True,
"voice_id": "<string>",
"is_rec": True,
"bgm": True,
"duration": 123,
"seed": 123,
"resolution": "<string>",
"payload": "<string>",
"off_peak": True,
"watermark": True,
"wm_position": 123,
"wm_url": "<string>",
"meta_data": "<string>"
}
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: '<string>',
images: [{}],
prompt: '<string>',
aspect_ratio: '<string>',
audio: true,
voice_id: '<string>',
is_rec: true,
bgm: true,
duration: 123,
seed: 123,
resolution: '<string>',
payload: '<string>',
off_peak: true,
watermark: true,
wm_position: 123,
wm_url: '<string>',
meta_data: '<string>'
})
};
fetch('https://www.token-nova.com/v1/video/create', 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://www.token-nova.com/v1/video/create",
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' => '<string>',
'images' => [
[
]
],
'prompt' => '<string>',
'aspect_ratio' => '<string>',
'audio' => true,
'voice_id' => '<string>',
'is_rec' => true,
'bgm' => true,
'duration' => 123,
'seed' => 123,
'resolution' => '<string>',
'payload' => '<string>',
'off_peak' => true,
'watermark' => true,
'wm_position' => 123,
'wm_url' => '<string>',
'meta_data' => '<string>'
]),
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://www.token-nova.com/v1/video/create"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"images\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"voice_id\": \"<string>\",\n \"is_rec\": true,\n \"bgm\": true,\n \"duration\": 123,\n \"seed\": 123,\n \"resolution\": \"<string>\",\n \"payload\": \"<string>\",\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"meta_data\": \"<string>\"\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://www.token-nova.com/v1/video/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"images\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"voice_id\": \"<string>\",\n \"is_rec\": true,\n \"bgm\": true,\n \"duration\": 123,\n \"seed\": 123,\n \"resolution\": \"<string>\",\n \"payload\": \"<string>\",\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"meta_data\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/v1/video/create")
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\": \"<string>\",\n \"images\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"voice_id\": \"<string>\",\n \"is_rec\": true,\n \"bgm\": true,\n \"duration\": 123,\n \"seed\": 123,\n \"resolution\": \"<string>\",\n \"payload\": \"<string>\",\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"meta_data\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2025-11-08T23:07:57.510141923+08:00",
"status": "processing",
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114"
}
统一视频
创建视频
使用 POST /v1/video/create 通过统一视频格式提交 Vidu 异步生成任务。
POST
https://www.token-nova.com
/
v1
/
video
/
create
创建视频
curl --request POST \
--url https://www.token-nova.com/v1/video/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"images": [
{}
],
"prompt": "<string>",
"aspect_ratio": "<string>",
"audio": true,
"voice_id": "<string>",
"is_rec": true,
"bgm": true,
"duration": 123,
"seed": 123,
"resolution": "<string>",
"payload": "<string>",
"off_peak": true,
"watermark": true,
"wm_position": 123,
"wm_url": "<string>",
"meta_data": "<string>"
}
'import requests
url = "https://www.token-nova.com/v1/video/create"
payload = {
"model": "<string>",
"images": [{}],
"prompt": "<string>",
"aspect_ratio": "<string>",
"audio": True,
"voice_id": "<string>",
"is_rec": True,
"bgm": True,
"duration": 123,
"seed": 123,
"resolution": "<string>",
"payload": "<string>",
"off_peak": True,
"watermark": True,
"wm_position": 123,
"wm_url": "<string>",
"meta_data": "<string>"
}
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: '<string>',
images: [{}],
prompt: '<string>',
aspect_ratio: '<string>',
audio: true,
voice_id: '<string>',
is_rec: true,
bgm: true,
duration: 123,
seed: 123,
resolution: '<string>',
payload: '<string>',
off_peak: true,
watermark: true,
wm_position: 123,
wm_url: '<string>',
meta_data: '<string>'
})
};
fetch('https://www.token-nova.com/v1/video/create', 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://www.token-nova.com/v1/video/create",
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' => '<string>',
'images' => [
[
]
],
'prompt' => '<string>',
'aspect_ratio' => '<string>',
'audio' => true,
'voice_id' => '<string>',
'is_rec' => true,
'bgm' => true,
'duration' => 123,
'seed' => 123,
'resolution' => '<string>',
'payload' => '<string>',
'off_peak' => true,
'watermark' => true,
'wm_position' => 123,
'wm_url' => '<string>',
'meta_data' => '<string>'
]),
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://www.token-nova.com/v1/video/create"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"images\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"voice_id\": \"<string>\",\n \"is_rec\": true,\n \"bgm\": true,\n \"duration\": 123,\n \"seed\": 123,\n \"resolution\": \"<string>\",\n \"payload\": \"<string>\",\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"meta_data\": \"<string>\"\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://www.token-nova.com/v1/video/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"images\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"voice_id\": \"<string>\",\n \"is_rec\": true,\n \"bgm\": true,\n \"duration\": 123,\n \"seed\": 123,\n \"resolution\": \"<string>\",\n \"payload\": \"<string>\",\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"meta_data\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/v1/video/create")
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\": \"<string>\",\n \"images\": [\n {}\n ],\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"audio\": true,\n \"voice_id\": \"<string>\",\n \"is_rec\": true,\n \"bgm\": true,\n \"duration\": 123,\n \"seed\": 123,\n \"resolution\": \"<string>\",\n \"payload\": \"<string>\",\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"meta_data\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2025-11-08T23:07:57.510141923+08:00",
"status": "processing",
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114"
}
创建视频
Vidu 统一视频入口使用POST /v1/video/create,请求体为 JSON。与 Vidu 官方格式 不同,本接口使用 images、aspect_ratio、resolution、duration 等字段。
- 路由入口是
POST /v1/video/create。 - 参考图通过
images数组传入 URL 列表,文生视频可传空数组。 - 常见模型示例为
viduq3-pro,以当前渠道实际可用模型为准。 - 提交成功后返回任务
id与status,后续用 查询任务 轮询结果。
支持模型
viduq3-pro: 高效生成优质音视频内容,让视频内容更生动、更形象、更立体viduq2-pro-fast: 价格触底、效果稳定,生成速度较 viduq2-turbo 提高 2-3 倍viduq2-pro: 新模型,效果好,细节丰富viduq2-turbo: 新模型,效果好,生成快viduq1: 画面清晰,平滑转场,运镜稳定viduq1-classic: 画面清晰,转场、运镜更丰富vidu2.0: 生成速度快
方法与路径
POST /v1/video/create
请求示例
curl -X POST https://www.token-nova.com/v1/video/create \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3-pro",
"prompt": "一只猫在草地上追逐蝴蝶",
"aspect_ratio": "16:9",
"duration": 5,
"audio": false,
"images": []
}'
import requests
resp = requests.post(
"https://www.token-nova.com/v1/video/create",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "viduq3-pro",
"prompt": "一只猫在草地上追逐蝴蝶",
"aspect_ratio": "16:9",
"duration": 5,
"audio": False,
"images": [],
},
timeout=60,
)
print(resp.json())
const response = await fetch("https://www.token-nova.com/v1/video/create", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "viduq3-pro",
prompt: "一只猫在草地上追逐蝴蝶",
aspect_ratio: "16:9",
duration: 5,
audio: false,
images: [],
}),
});
console.log(await response.json());
响应示例
{
"created_at": "2025-11-08T23:07:57.510141923+08:00",
"status": "processing",
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114"
}
认证
Authorization: Bearer YOUR_API_KEY
Body
模型名称。支持
viduq3-pro、viduq2-pro-fast、viduq2-pro、viduq2-turbo、viduq1、viduq1-classic、vidu2.0。图像数组。支持传入图片 Base64 编码或图片 URL(确保可访问)。文生视频传空数组
[],图生视频传 1 张图片,首尾帧生视频传 2 张图片。图片支持 png、jpeg、jpg、webp 格式,比例需小于 1:4 或 4:1,大小不超过 50 MB。文本提示词。生成视频的文本描述,最大长度 2000 字符。若使用
is_rec 推荐提示词参数,模型将不考虑此参数所输入的提示词。比例。默认
16:9,可选值:16:9、9:16、3:4、4:3、1:1。注:3:4、4:3 仅支持 q2、q3 模型。是否使用音视频直出能力。默认
false。false:不需要音视频直出,输出静音视频;true:需要音视频直出,输出带台词以及背景音的视频。音色 ID,q3 模型不生效。用来决定视频中的声音音色,为空时系统会自动推荐。
是否使用推荐提示词。
true:是,由系统自动推荐提示词,并使用提示词内容生成视频,推荐提示词数量=1;false:否,根据输入的 prompt 生成视频。是否为生成的视频添加背景音乐。默认
false。true:系统将从预设 BGM 库中自动挑选合适的音乐并添加;false:不添加 BGM。视频时长(秒)。
viduq2 系列默认为 5,可选:1-10。随机种子。当默认不传或者传 0 时,会使用随机数替代。手动设置则使用设置的种子。
分辨率参数,默认值依据模型和视频时长而定。可选值:
540p、720p、1080p、360p。viduq2(1-10 秒):默认 720p,可选:540p、720p、1080p。透传参数。不做任何处理,仅数据传输,最大长度 1048576 字符。
错峰模式。默认
false。true:错峰生成视频;false:即时生成视频。是否添加水印。默认
false。true:添加水印;false:不添加水印。水印位置。默认
3(右下角)。可选值:1:左上角;2:右上角;3:右下角;4:左下角。水印内容,此处为图片 URL。不传时,使用默认水印:内容由 AI 生成。
元数据标识。JSON 格式字符串,透传字段。
Response
创建时间(ISO 8601 格式)。
任务状态,常见值包括
processing、failed、completed。任务 ID,后续查询时作为
id 参数传入。相关接口
⌘I
