Vidu Text-to-Video
curl --request POST \
--url https://www.token-nova.com/vidu/ent/v2/text2video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"style": "<string>",
"prompt": "<string>",
"duration": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"bgm": true,
"audio": true,
"off_peak": true,
"watermark": true,
"wm_position": 123,
"wm_url": "<string>",
"payload": "<string>",
"meta_data": "<string>"
}
'import requests
url = "https://www.token-nova.com/vidu/ent/v2/text2video"
payload = {
"model": "<string>",
"style": "<string>",
"prompt": "<string>",
"duration": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"bgm": True,
"audio": True,
"off_peak": True,
"watermark": True,
"wm_position": 123,
"wm_url": "<string>",
"payload": "<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>',
style: '<string>',
prompt: '<string>',
duration: 123,
seed: 123,
aspect_ratio: '<string>',
resolution: '<string>',
bgm: true,
audio: true,
off_peak: true,
watermark: true,
wm_position: 123,
wm_url: '<string>',
payload: '<string>',
meta_data: '<string>'
})
};
fetch('https://www.token-nova.com/vidu/ent/v2/text2video', 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/vidu/ent/v2/text2video",
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>',
'style' => '<string>',
'prompt' => '<string>',
'duration' => 123,
'seed' => 123,
'aspect_ratio' => '<string>',
'resolution' => '<string>',
'bgm' => true,
'audio' => true,
'off_peak' => true,
'watermark' => true,
'wm_position' => 123,
'wm_url' => '<string>',
'payload' => '<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/vidu/ent/v2/text2video"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"style\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"bgm\": true,\n \"audio\": true,\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"payload\": \"<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/vidu/ent/v2/text2video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"style\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"bgm\": true,\n \"audio\": true,\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/vidu/ent/v2/text2video")
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 \"style\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"bgm\": true,\n \"audio\": true,\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "processing",
"created_at": 1774494511
}
Official Format
Vidu Text-to-Video
Use POST /vidu/ent/v2/text2video to submit a pure-text video generation task.
POST
https://www.token-nova.com
/
vidu
/
ent
/
v2
/
text2video
Vidu Text-to-Video
curl --request POST \
--url https://www.token-nova.com/vidu/ent/v2/text2video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"style": "<string>",
"prompt": "<string>",
"duration": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"bgm": true,
"audio": true,
"off_peak": true,
"watermark": true,
"wm_position": 123,
"wm_url": "<string>",
"payload": "<string>",
"meta_data": "<string>"
}
'import requests
url = "https://www.token-nova.com/vidu/ent/v2/text2video"
payload = {
"model": "<string>",
"style": "<string>",
"prompt": "<string>",
"duration": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"bgm": True,
"audio": True,
"off_peak": True,
"watermark": True,
"wm_position": 123,
"wm_url": "<string>",
"payload": "<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>',
style: '<string>',
prompt: '<string>',
duration: 123,
seed: 123,
aspect_ratio: '<string>',
resolution: '<string>',
bgm: true,
audio: true,
off_peak: true,
watermark: true,
wm_position: 123,
wm_url: '<string>',
payload: '<string>',
meta_data: '<string>'
})
};
fetch('https://www.token-nova.com/vidu/ent/v2/text2video', 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/vidu/ent/v2/text2video",
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>',
'style' => '<string>',
'prompt' => '<string>',
'duration' => 123,
'seed' => 123,
'aspect_ratio' => '<string>',
'resolution' => '<string>',
'bgm' => true,
'audio' => true,
'off_peak' => true,
'watermark' => true,
'wm_position' => 123,
'wm_url' => '<string>',
'payload' => '<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/vidu/ent/v2/text2video"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"style\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"bgm\": true,\n \"audio\": true,\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"payload\": \"<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/vidu/ent/v2/text2video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"style\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"bgm\": true,\n \"audio\": true,\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.token-nova.com/vidu/ent/v2/text2video")
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 \"style\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"bgm\": true,\n \"audio\": true,\n \"off_peak\": true,\n \"watermark\": true,\n \"wm_position\": 123,\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "processing",
"created_at": 1774494511
}
Vidu Text-to-Video
The official Vidu text-to-video API, submitted asapplication/json.
- The route entry is
POST /vidu/ent/v2/text2video. - Currently submitted as
application/json. - Supports pure-text video generation.
- After a successful submission, the task
task_idandstatusare returned. Use Query Task to poll for results.
Supported Models
viduq3-pro: Efficiently generates high-quality audio and video content, making the video more vivid, more realistic, and more three-dimensionalviduq2: Latest modelviduq1: Clear image quality, smooth transitions, and stable camera movement
Method and Path
POST /vidu/ent/v2/text2video
Request Example
curl -X POST https://www.token-nova.com/vidu/ent/v2/text2video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3-pro",
"style": "general",
"prompt": "A cat chasing butterflies on the grass",
"duration": 5,
"seed": 0,
"aspect_ratio": "16:9",
"resolution": "720p",
"bgm": false,
"audio": true,
"off_peak": false,
"watermark": false
}'
import requests
resp = requests.post(
"https://www.token-nova.com/vidu/ent/v2/text2video",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "viduq3-pro",
"style": "general",
"prompt": "A cat chasing butterflies on the grass",
"duration": 5,
"seed": 0,
"aspect_ratio": "16:9",
"resolution": "720p",
"bgm": False,
"audio": True,
"off_peak": False,
"watermark": False
},
timeout=60,
)
print(resp.json())
Response Example
{
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114",
"status": "processing",
"created_at": 1774494511
}
Authentication
Authorization: Bearer YOUR_API_KEY
Body
string
required
Model name. Supported
viduq3-pro (efficiently generates high-quality audio and video content), viduq2 (latest model), viduq1 (clear image quality, smooth transitions, and stable camera movement).string
Style.
general: general style; anime: anime style. Note: this parameter does not take effect when using q2 or q3 models.string
required
Text prompt. The text description for video generation, supporting Chinese and English.
integer
Video duration (seconds).
viduq2: default 5 seconds, optional 1-10 seconds; other models use the default value.integer
Random seed. If not provided or set to 0, a random number is used; if set manually, the specified seed is used.
string
Aspect ratio. Optional values:
16:9 (default), 9:16, 3:4, 4:3, 1:1. Note: 3:4 and 4:3 are only supported by q2 and q3 models.string
Resolution. The default value depends on the model and video duration.
viduq2 (1-10 seconds): default 720p, optional 540p, 720p, 1080p.boolean
Whether to add background music.
true: the system will automatically select suitable music from the preset BGM library and add it; false: do not add BGM. Note: the BGM parameter does not take effect when the duration of the q2 model is 9 or 10 seconds; it does not take effect in the q3 model.boolean
Audio-video direct output (supported only by q3 models).
true: audio-video direct output is required, outputting a video with dialogue and background sound; false: audio-video direct output is not required, outputting a silent video.boolean
Off-peak mode.
true: generate videos during off-peak periods, with lower points cost; false: generate videos immediately.boolean
Whether to add a watermark.
true: add a watermark; false: do not add a watermark. Note: the watermark content is fixed as “Content generated by AI”, and it is not added by default.integer
Watermark position.
1: top-left; 2: top-right; 3: bottom-right; 4: bottom-left.string
Watermark image URL. If not provided, the default watermark is used.
string
Pass-through parameter. No processing is performed; data transmission only.
string
Metadata identifier. JSON-formatted string, pass-through field.
Response
string
Task ID, used to query task status.
string
Task status. Optional values:
processing (in progress), failed (failed), completed (completed).integer
Creation timestamp (Unix timestamp).
