文本生成视频
更新时间: 2026/08/27 10:13:38
该接口可以根据文本提示词生成视频。
请求信息
请求 URL
POST /hub/vidu/v2/text2video
请求头
| Header | 必填 | 示例值 |
|---|---|---|
Authorization |
是 | Bearer sk-xxxxx |
Content-Type |
是 | application/json; charset=utf-8 |
请求体
请求示例
httpPOST /hub/vidu/v2/text2video
Authorization: Bearer sk-xxxxx
Content-Type: application/json; charset=utf-8
json{
"model": "viduq3-pro",
"style": "general",
"prompt": "一名宇航员在薄雾中缓慢前行,镜头从中景推进到近景,背景有金色灯光闪烁。",
"duration": 5,
"seed": 0,
"aspect_ratio": "16:9",
"resolution": "720p",
"movement_amplitude": "auto",
"off_peak": false
}
响应信息
响应体
| 字段 | 类型 | 说明 |
|---|---|---|
task_id |
string | 任务 ID |
state |
string | 任务状态。常见值:created、queueing、processing、success、failed |
model |
string | 本次调用使用的模型 |
style |
string | 本次调用使用的风格 |
prompt |
string | 本次调用的提示词 |
duration |
int | 本次调用的视频时长 |
seed |
int | 本次调用的随机种子 |
aspect_ratio |
string | 本次调用的画面比例 |
resolution |
string | 本次调用的分辨率 |
movement_amplitude |
string | 本次调用的运动幅度 |
payload |
string | 本次调用传入的透传字段 |
off_peak |
bool | 本次调用是否启用错峰 |
watermark |
bool | 本次调用是否启用水印 |
credits |
string | 消耗量 |
created_at |
string | 创建时间 |
响应示例
json{
"task_id": "tsk_1234567890",
"state": "created",
"model": "viduq3-pro",
"style": "general",
"prompt": "一名宇航员在薄雾中缓慢前行,镜头从中景推进到近景,背景有金色灯光闪烁。",
"duration": 5,
"seed": 24681357,
"aspect_ratio": "16:9",
"resolution": "720p",
"movement_amplitude": "auto",
"payload": "",
"off_peak": false,
"watermark": false,
"credits": "12.500000",
"created_at": "2026-04-16T09:30:00Z"
}
错误码
完整列表请参考客户端 API 错误码。
此文档是否对你有帮助?




