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-image-to-video",
"generation_type": "image-to-video",
"image_urls": [
"https://example.com/start.jpg"
],
"prompt": "The camera slowly pushes in as the subject smiles",
"duration": 5,
"resolution": "1080p"
}
'{
"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-image-to-video",
"generation_type": "image-to-video",
"image_urls": [
"https://example.com/start.jpg"
],
"prompt": "The camera slowly pushes in as the subject smiles",
"duration": 5,
"resolution": "1080p"
}
'{
"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-image-to-video:单图生视频、首尾帧过渡、视频续写
示例:
"wan-2.7-image-to-video"
生成模式
可选值:
image-to-video— 单图生视频,image_urls恰好 1 张first-last-frame— 首尾帧过渡,image_urls恰好 2 张video-continuation— 基于video_url做视频续写
可用选项:
image-to-video, first-last-frame, video-continuation 示例:
"image-to-video"
图片 URL 列表
说明:
- 单图生视频:传 1 张
- 首尾帧过渡:传 2 张,顺序为首帧、尾帧
- 每张图片支持
JPEG/JPG/PNG/BMP/WEBP - 每张图片大小上限
20MB
示例:
["https://example.com/start.jpg"]
输入视频的公开 URL
说明:
- 用于视频续写模式
- 支持
MP4/MOV - 输入视频时长需在
2-10秒之间 - 文件大小上限
100MB - 不能与
image_urls同时传入
示例:
"https://example.com/clip.mp4"
可选提示词,用于补充描述期望的镜头运动、主体动作或场景变化
说明:
- 最多
5000个字符
Maximum string length:
5000示例:
"The camera slowly pushes in as the subject smiles"
驱动音频的公开 URL
说明:
- 支持 WAV / MP3
- 音频时长需在
2-30秒之间 - 文件大小上限
15MB
示例:
"https://example.com/music.mp3"
输出视频时长(秒),支持 2-15 的整数秒
必填范围:
2 <= x <= 15示例:
2
输出视频分辨率,可选 720p 或 1080p
可用选项:
720p, 1080p 示例:
"720p"
负向提示词,用于描述希望避免出现的内容
Maximum string length:
500示例:
"blurry, jitter"
随机种子,用于提升结果复现性
必填范围:
0 <= x <= 2147483647示例:
123
是否启用提示词扩展,不传则使用模型默认行为
非必须不要传这个参数。
示例:
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"