curl --request POST \
--url https://api.aihubmax.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-2.7-reference-to-video",
"prompt": "A graceful dance performance on a moonlit stage",
"reference_image_urls": [
"https://example.com/character.jpg"
],
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}
'{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "video"
}{
"error": {
"message": "请求格式错误",
"type": "invalid_request_error"
}
}{
"error": {
"message": "API密钥无效",
"type": "authentication_error"
}
}{
"error": {
"message": "账户余额不足",
"type": "insufficient_quota"
}
}{
"error": {
"message": "参数校验失败",
"type": "validation_error"
}
}{
"error": {
"message": "请求频率超限",
"type": "rate_limit_error"
}
}{
"error": {
"message": "服务器内部错误",
"type": "server_error"
}
}{
"error": {
"message": "服务暂不可用,请稍后重试",
"type": "service_unavailable"
}
}Wan2.7
万象2.7 参考视频生成
- Wan 2.7 参考生视频模型,支持参考图、参考视频、多主体和多镜头分段
- 异步处理模式,使用返回的任务ID 进行查询
- 生成的视频链接,有效期为24小时,请尽快保存
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.aihubmax.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-2.7-reference-to-video",
"prompt": "A graceful dance performance on a moonlit stage",
"reference_image_urls": [
"https://example.com/character.jpg"
],
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}
'{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "video"
}{
"error": {
"message": "请求格式错误",
"type": "invalid_request_error"
}
}{
"error": {
"message": "API密钥无效",
"type": "authentication_error"
}
}{
"error": {
"message": "账户余额不足",
"type": "insufficient_quota"
}
}{
"error": {
"message": "参数校验失败",
"type": "validation_error"
}
}{
"error": {
"message": "请求频率超限",
"type": "rate_limit_error"
}
}{
"error": {
"message": "服务器内部错误",
"type": "server_error"
}
}{
"error": {
"message": "服务暂不可用,请稍后重试",
"type": "service_unavailable"
}
}授权
所有接口均需要使用Bearer Token进行认证
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
wan-2.7-reference-to-video:参考图/参考视频生视频
示例:
"wan-2.7-reference-to-video"
视频生成提示词,描述希望生成的视频内容
说明:
- 最多
5000个字符
Maximum string length:
5000示例:
"A graceful dance performance on a moonlit stage"
参考图片 URL 列表
说明:
- 用于提供角色或物体的外观参考
- 多主体场景可传多张图片
- 每张图片大小上限
20MB
示例:
["https://example.com/character.jpg"]
参考视频 URL 列表
说明:
- 用于提供角色或物体的动作参考
- 多主体场景可传多个视频
- 每个视频大小上限
100MB
示例:
["https://example.com/motion.mp4"]
输出视频时长(秒),支持 2-10 的整数秒
必填范围:
2 <= x <= 10示例:
2
输出视频分辨率,可选 720p 或 1080p
可用选项:
720p, 1080p 示例:
"720p"
输出视频宽高比
可选值: 16:9、9:16、1:1、4:3、3:4
可用选项:
16:9, 9:16, 1:1, 4:3, 3:4 示例:
"16:9"
负向提示词,用于描述希望避免出现的内容
Maximum string length:
500示例:
"blurry, jitter"
随机种子,用于提升结果复现性
必填范围:
0 <= x <= 2147483647示例:
123
是否启用多镜头分段生成
说明:
- 设为
true时,系统会尝试生成多镜头段落 - 不传时使用模型默认行为
非必须不要传这个参数。
示例:
true
是否启用安全检查,不传则使用模型默认行为
非必须不要传这个参数。
示例:
true
响应
任务创建成功
任务创建时间戳
示例:
1757165031
任务ID
示例:
"task-unified-1757165031-uyujaw3d"
实际使用的模型名称
任务的具体类型
可用选项:
video.generation.task 任务进度百分比 (0-100)
必填范围:
0 <= x <= 100示例:
0
任务状态
可用选项:
pending, processing, completed, failed 示例:
"pending"
异步任务信息
Show child attributes
Show child attributes
任务的输出类型
可用选项:
video 示例:
"video"