AI 模型接口视频Minimax
图生视频
POST
/api/v1/video/generationHeader Parameters
Authorization*string
格式: Authorization: Bearer sk-xxxxxx
Request Body
application/json
_action*string
固定值i2v
model*string
模型名称, 支持:
minimax-hailuo-2.3
minimax-hailuo-2.3-fast
image*object
图片信息,传单图首帧必填。包含 imageUrl 字段(图片 URL,需公网可访问)。
图片大小小于 20MB
格式支持 JPG/JPEG/PNG/WebP
短边像素大于 300px,长宽比在 2:5 和 5:2 之间
imageUrl*string
图片链接
headtailImages*object
首尾帧图片信息(仅 minimax-hailuo-02 支持),其中尾帧图必填。
包含 headImage.imageUrl(首帧图片)和 tailImage.imageUrl(尾帧图片)
headImage?object
首帧图片信息
imageUrl?string
图片链接
tailImage?object
尾帧图片信息
imageUrl?string
图片链接
prompt?string
提示词,不超过 2000 字符
duration?integer
视频分辨率,支持:768p(默认)、1080p(仅支持 6s)
resolution?string
视频分辨率,支持: 768p(默认) 1080p(仅支持6s)
promptOptimizer?boolean
是否自动优化 prompt,默认为 true
fastPretreatment?boolean
是否缩短 prompt_optimizer 的优化耗时,默认为 false。该参数仅传 image 参数时生效
aigcWatermark?boolean
是否在生成的视频中添加水印,默认为 false
Response Body
application/json
curl -X POST "https://api.aa.com.cn/api/v1/video/generation" \ -H "Authorization: string" \ -H "Content-Type: application/json" \ -d '{ "_action": "string", "model": "string", "image": { "imageUrl": "string" }, "headtailImages": { "headImage": { "imageUrl": "string" }, "tailImage": { "imageUrl": "string" } }, "prompt": "string", "duration": 0, "resolution": "string", "promptOptimizer": true, "fastPretreatment": true, "aigcWatermark": true }'{
"code": 0,
"data": {
"urls": [
"string"
],
"usage": {
"images": 0,
"seconds": 0,
"input_tokens": 0,
"total_tokens": 0,
"output_tokens": 0
},
"expired": "string",
"task_id": "string",
"task_status": "string"
},
"message": "string",
"request_id": "string"
}