Vidu V2(文字生成视频)
POST /vidu/ent/v2/text2video
基于文本提示词生成视频任务。Vidu 官方文档:Text to Video 官网:https://www.vidu.studio/
Base URL
https://api.novapai.ai/router/v1
认证
- Header:
Authorization: Bearer <YOUR_API_KEY> - Header:
Content-Type: application/json
请求体参数(核心字段)
model(string, required):viduq2/viduq1/vidu1.5/viduq3-pro/viduq3-turboprompt(string, required): 文本提示词,最长 2000 字符style(string):general/animeduration(integer): 视频时长(按模型限制)aspect_ratio(string):16:9/9:16/3:4/4:3/1:1resolution(string):360p/540p/720p/1080pseed(string): 随机种子,0或不传为随机off_peak(boolean): 错峰模式(主要支持 q3 系列)audio(boolean): 是否启用音视频直出(q3 系列)
请求示例
curl -X POST "https://api.novapai.ai/router/v1/vidu/ent/v2/text2video" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3-pro",
"style": "general",
"prompt": "An astronaut walking through golden fog, cinematic style.",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "1080p",
"seed": "0",
"off_peak": true,
"audio": true
}'响应示例
{
"task_id": "916198342210367488",
"type": "text2video",
"state": "created",
"model": "viduq3-pro",
"prompt": "An astronaut walking through golden fog, cinematic style.",
"duration": 5,
"resolution": "1080p",
"off_peak": true
}说明
- 该接口返回任务创建结果,需调用 Fetch V2 查询最终视频地址。
- 价格随模型/分辨率/时长变化,具体见源文档定价表。积分换算:
1 积分 = 0.005 PTC。