POST
/minimax/v1/video_generation首尾帧生成视频
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/minimax/v1/video_generation \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-Hailuo-02",
"last_frame_image": "https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg",
"first_frame_image": "https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg",
"prompt": "A little girl grow up [推进].",
"duration": 6,
"resolution": "1080P",
"prompt_optimizer": true,
"callback_url": "https://your-domain.com/api/video/callback",
"aigc_watermark": false
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
model | JSON body | string | 是 | 模型名称。仅支持 MiniMax-Hailuo-02(注意:首尾帧生成功能不支持 512P 分辨率) | - |
last_frame_image | JSON body | string | 是 | 视频的结束帧图片。支持公网 URL 或 Base64 编码的 Data URL(data:image/jpeg;base64,...)。格式:JPG/JPEG/PNG/WebP,体积 < 20MB,短边 > 300px,长宽比 2:5 至 5:2 之间 | - |
first_frame_image | JSON body | string | 是 | 视频的起始帧图片。支持公网 URL 或 Base64 编码的 Data URL。格式要求同 last_frame_image。⚠️ 生成视频尺寸遵循首帧图片,首尾帧尺寸不一致时会按首帧裁剪尾帧 | - |
prompt | JSON body | string | 是 | 视频的文本描述,最大 2000 字符。 | - |
duration | JSON body | integer | 是 | 视频时长(秒)。可用值:6 或 10(10秒仅支持 768P) | - |
resolution | JSON body | string | 是 | 视频分辨率。可选值:768P(默认,支持 6s/10s), 1080P(仅支持 6s | - |
prompt_optimizer | JSON body | boolean | 是 | 是否自动优化 prompt。设为 false 可进行更精确的控制 | - |
callback_url | JSON body | string | 是 | 接收任务状态更新通知的回调 URL。配置后会收到任务状态变更的异步通知 | - |
aigc_watermark | JSON body | boolean | 是 | 是否在生成的视频中添加 AIGC 水印 | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
task_id | 响应 JSON | string | 是 | - | - |
base_resp | 响应 JSON | object | 是 | - | - |
base_resp.status_code | 响应 JSON | integer | 是 | - | - |
base_resp.status_msg | 响应 JSON | string | 是 | - | - |
响应示例
{
"task_id": "106916112212032",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 497673408,
"name": "首尾帧生成视频",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/minimax/v1/video_generation",
"tags": [],
"status": -2,
"requestBody": {
"type": "application/json",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "模型名称。仅支持 MiniMax-Hailuo-02(注意:首尾帧生成功能不支持 512P 分辨率)"
},
"last_frame_image": {
"type": "string",
"description": "视频的结束帧图片。支持公网 URL 或 Base64 编码的 Data URL(data:image/jpeg;base64,...)。格式:JPG/JPEG/PNG/WebP,体积 < 20MB,短边 > 300px,长宽比 2:5 至 5:2 之间"
},
"first_frame_image": {
"type": "string",
"description": "视频的起始帧图片。支持公网 URL 或 Base64 编码的 Data URL。格式要求同 last_frame_image。⚠️ 生成视频尺寸遵循首帧图片,首尾帧尺寸不一致时会按首帧裁剪尾帧"
},
"prompt": {
"type": "string",
"description": "视频的文本描述,最大 2000 字符。"
},
"duration": {
"type": "integer",
"description": "视频时长(秒)。可用值:6 或 10(10秒仅支持 768P)"
},
"resolution": {
"type": "string",
"description": "视频分辨率。可选值:768P(默认,支持 6s/10s), 1080P(仅支持 6s"
},
"prompt_optimizer": {
"type": "boolean",
"description": "是否自动优化 prompt。设为 false 可进行更精确的控制"
},
"callback_url": {
"type": "string",
"description": "接收任务状态更新通知的回调 URL。配置后会收到任务状态变更的异步通知"
},
"aigc_watermark": {
"type": "boolean",
"description": "是否在生成的视频中添加 AIGC 水印"
}
},
"required": [
"model",
"last_frame_image",
"first_frame_image",
"prompt",
"duration",
"resolution",
"prompt_optimizer",
"callback_url",
"aigc_watermark"
],
"x-apifox-orders": [
"model",
"last_frame_image",
"first_frame_image",
"prompt",
"duration",
"resolution",
"prompt_optimizer",
"callback_url",
"aigc_watermark"
]
},
"examples": [
{
"mediaType": "application/json",
"value": "{\r\n \"model\": \"MiniMax-Hailuo-02\",\r\n \"last_frame_image\": \"https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg\",\r\n \"first_frame_image\": \"https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg\",\r\n \"prompt\": \"A little girl grow up [推进].\",\r\n \"duration\": 6,\r\n \"resolution\": \"1080P\",\r\n \"prompt_optimizer\": true,\r\n \"callback_url\": \"https://your-domain.com/api/video/callback\",\r\n \"aigc_watermark\": false\r\n}",
"name": "示例 1"
}
],
"mediaType": "",
"oasExtensions": "",
"required": true,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": []
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {},
"responses": [
{
"id": 168370100,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"task_id": {
"type": "string"
},
"base_resp": {
"type": "object",
"properties": {
"status_code": {
"type": "integer"
},
"status_msg": {
"type": "string"
}
},
"required": [
"status_code",
"status_msg"
],
"x-apifox-orders": [
"status_code",
"status_msg"
]
}
},
"required": [
"task_id",
"base_resp"
],
"x-apifox-orders": [
"task_id",
"base_resp"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": []
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 168370100,
"data": "{\r\n \"task_id\": \"106916112212032\",\r\n \"base_resp\": {\r\n \"status_code\": 0,\r\n \"status_msg\": \"success\"\r\n }\r\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4bea-77ac-9aa4-6c0e7f2fa454"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436087,
"ordering": 66,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {}
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-05T14:40:23.000Z",
"updatedAt": "2026-08-05T14:40:31.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}