任务:文生视频
概览
- 请求方法:
POST - 路径:
/task/vidu/text2video - 内容类型:
application/json - Tags:视频模型(Video)/vidu视频
认证
- Header:
Authorization: Bearer <token>
请求参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| model | string | 是 | vidu1.5 / vidu1.0(不支持 vidu2.0) |
| style | string | 否 | general/anime,默认 general |
| prompt | string | 是 | 文本提示词,<=1500 字符 |
| duration | integer | 是 | 4 或 8 |
| seed | integer | 否 | 0 表示随机,可自定义固定结果 |
| aspect_ratio | string | 否 | 16:9 / 9:16 / 1:1(默认16:9) |
| resolution | string | 是 | 360p/720p/1080p(vidu1.0仅360p) |
| movement_amplitude | string | 否 | auto/small/medium/large |
| callback_url | string | 否 | 回调 URL,状态变更时通知 |
请求示例
bash
curl -X POST "https://api.gpt.ge/task/vidu/text2video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{
"model":"vidu1.5",
"style":"general",
"prompt":"古风美女...",
"duration":4,
"resolution":"720p",
"aspect_ratio":"16:9"
}'返回示例(200)
json
{
"task_id":"SPC6X7SLGD0HCJMWFQ3RTLRUNZZV4I1M",
"state":"created",
"model":"vidu1.5",
"style":"general",
"prompt":"古风美女...",
"duration":4,
"seed":1234,
"aspect_ratio":"16:9",
"resolution":"720p",
"movement_amplitude":"auto",
"created_at":"2025-01-01T15:41:31.968916Z"
}