curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "alibaba/wan-2.5/text-to-video",
"input": {
"aspect_ratio": "832*480",
"prompt": "A quiet forest under soft morning light, with natural detail.",
"duration": 5
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Alibaba
Wan 2.5 文生视频
Wan 2.5 API 根据文本生成 5 或 10 秒的视频,支持同步音频,横屏或竖屏输出最高 1080p。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "alibaba/wan-2.5/text-to-video",
"input": {
"aspect_ratio": "832*480",
"prompt": "A quiet forest under soft morning light, with natural detail.",
"duration": 5
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
alibaba/wan-2.5/text-to-video:根据文本提示词生成视频场景。
请求参数
model 和可选的 callback_url 放在请求根级,下列生成参数放在 input 内。
prompt
prompt(string,必填):描述主体、场景和运动。去除首尾空白后为 1–1500 个字符。
aspect_ratio
aspect_ratio(string,必填):画面尺寸,单位像素(width*height):832*480、480*832、1280*720、720*1280、1920*1080、1080*1920。
duration
duration(integer,可选):视频时长:5 或 10 秒。默认:5。
audio
audio(string,可选):可选的音频文件 URL,为视频提供一段录音。
negative_prompt
negative_prompt(string,可选):可选,描述场景中要排除的元素。
seed
seed(integer,可选):可选的整数随机种子,用于复用生成设置。
获取视频
使用task_id 查询任务。status 为 not_started 或 running 时继续轮询。状态为 finished 时,从 data.files[].file_url 读取视频 URL;状态为 failed 时,从 data.error_message 读取错误详情。授权
使用 VIDGO_API_KEY。
请求体
application/json