首尾帧生成视频
⚠️ 测试中
▼
Authorization
在 Header 添加参数 Authorization,其值为 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
请求参数
Header 参数
Content-Type
string
可选
示例: application/json
Authorization
string
可选
示例: Bearer {{YOUR_API_KEY}}
Body 参数 application/json
model
string
必需
模型名称。仅支持 MiniMax-Hailuo-02(注意:首尾帧生成功能不支持 512P 分辨率)
last_frame_image
string
必需
视频的结束帧图片。支持公网 URL 或 Base64 编码的 Data URL(data:image/jpeg;base64,...)。格式:JPG/JPEG/PNG/WebP,体积 < 20MB,短边 > 300px,长宽比 2:5 至 5:2 之间
first_frame_image
string
必需
视频的起始帧图片。支持公网 URL 或 Base64 编码的 Data URL。格式要求同 last_frame_image。⚠️ 生成视频尺寸遵循首帧图片,首尾帧尺寸不一致时会按首帧裁剪尾帧
prompt
string
必需
视频的文本描述,最大 2000 字符。
duration
integer
必需
视频时长(秒)。可用值:6 或 10(10秒仅支持 768P)
resolution
string
必需
视频分辨率。可选值:768P(默认,支持 6s/10s), 1080P(仅支持 6s)
prompt_optimizer
boolean
可选
是否自动优化 prompt。设为 false 可进行更精确的控制
callback_url
string
可选
接收任务状态更新通知的回调 URL。配置后会收到任务状态变更的异步通知
aigc_watermark
boolean
可选
是否在生成的视频中添加 AIGC 水印
示例
{
"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
}
请求示例代码
curl --location --request POST 'https://api.quickrouter.ai/minimax/v1/video_generation' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{
"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
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"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
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.quickrouter.ai/minimax/v1/video_generation", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import http.client
import json
conn = http.client.HTTPSConnection("api.quickrouter.ai")
payload = json.dumps({
"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
})
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
conn.request("POST", "/minimax/v1/video_generation", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
返回响应
响应参数 application/json
task_id
string
可选
任务ID
base_resp
object
可选
基本响应
示例
{
"task_id": "106916112212032",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}