文生图生视频生成任务
POST /minimax/v1/video_generation
概览
| Method | POST |
|---|---|
| Path | /minimax/v1/video_generation |
| Type | http |
| Status | -2 |
| Module | 2102810 |
| Folder | 78007621 |
参数
{ "header": [ { "required": false, "description": "", "type": "string", "id": "scM7JsWA39", "enable": true, "name": "Authorization", "sampleValue": "sk-" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "model": { "type": "string", "description": "模型名称。可选值:MiniMax-Hailuo-2.3, MiniMax-Hailuo-02" }, "prompt": { "type": "string", "description": "视频的文本描述,最大 2000 字符。支持使用 [指令] 语法进行运镜控制,如 [左移], [右移], [推进], [拉远], [上升], [下降], [左摇], [右摇], [上摇], [下摇], [变焦推近], [变焦拉远], [晃动], [跟随], [固定] 等 15 种运镜指令" }, "duration": { "type": "integer", "description": "频时长(秒)。可用值:6 或 10(10秒仅支持 768P 分辨率的 Hailuo 系列模型)" }, "resolution": { "type": "string", "description": "频分辨率。可选值:720P(其他模型默认), 768P(Hailuo 系列默认), 1080P(仅支持 6 秒)" }, "prompt_optimizer": { "type": "boolean", "description": "是否自动优化 prompt。设为 false 可进行更精确的控制" }, "fast_pretreatment": { "type": "boolean", "description": "是否缩短 prompt_optimizer 的优化耗时。仅对 MiniMax-Hailuo-2.3 和 MiniMax-Hailuo-02 模型生效" }, "callback_url": { "type": "string", "description": "接收任务状态更新通知的回调 URL。配置后会收到任务状态变更的异步通知(processing/success/failed)" }, "aigc_watermark": { "type": "boolean", "description": "是否在生成的视频中添加 AIGC 水印" }, "first_frame_image": { "type": "string", "description": "将指定图片作为视频的起始帧。支持公网 URL 或 Base64 编码的 Data URL (data:image/jpeg;base64,...)" } }, "required": [ "model", "prompt", "duration", "resolution", "prompt_optimizer", "fast_pretreatment", "callback_url", "aigc_watermark", "first_frame_image" ], "x-apifox-orders": [ "model", "prompt", "duration", "resolution", "prompt_optimizer", "fast_pretreatment", "callback_url", "aigc_watermark", "first_frame_image" ] }, "required": false, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "\r\n{\r\n \"model\": \"MiniMax-Hailuo-02\",\r\n \"prompt\": \"A man picks up a book [Pedestal up], then reads [Static shot].\",\r\n \"duration\": 6,\r\n \"resolution\": \"1080P\"\r\n}\r\n", "name": "示例 1" } ], "oasExtensions": "" }
响应
[ { "id": 142812591, "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": [] } ]
响应示例
[ { "name": "成功示例", "responseId": 142812591, "data": "{\r\n \"task_id\": \"106916112212032\",\r\n \"base_resp\": {\r\n \"status_code\": 0,\r\n \"status_msg\": \"success\"\r\n }\r\n}", "id": "019c1ddf-81b0-73c3-837b-84150e49ce61" } ]