Theme
First and Last Frame Video Generation
POST
https://www.kkiai.com/minimax/v1/video_generation
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Body Parameters (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Model name. Only supports MiniMax-Hailuo-02 (Note: First and last frame generation does not support 512P resolution) |
last_frame_image | string | Required | End frame image of the video. Supports public URLs or Base64-encoded Data URLs (data:image/jpeg;base64,...). Format: JPG/JPEG/PNG/WebP, size < 20MB, short side > 300px, aspect ratio between 2:5 and 5:2 |
first_frame_image | string | Required | Start frame image of the video. Format requirements same as last_frame_image. ⚠️ Generated video dimensions follow the first frame image. When first and last frame sizes are inconsistent, the last frame will be cropped according to the first frame |
prompt | string | Required | Text description of the video, maximum 2000 characters. |
duration | integer | Required | Video duration (seconds). Available values: 6 or 10 (10 seconds only supports 768P) |
resolution | string | Required | Video resolution. Optional values: 768P (default, supports 6s/10s), 1080P (only supports 6s) |
prompt_optimizer | boolean | Required | Whether to automatically optimize the prompt. Set to false for more precise control |
callback_url | string | Required | Callback URL to receive task status update notifications. Once configured, you will receive asynchronous notifications of task status changes |
aigc_watermark | boolean | Required | Whether to add an AIGC watermark to the generated video |
Request Example
json
{
"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 grows up as the camera slowly pushes in.",
"duration": 6,
"resolution": "1080P",
"prompt_optimizer": true,
"callback_url": "https://your-domain.com/api/video/callback",
"aigc_watermark": false
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/minimax/v1/video_generation' \
--header 'Authorization: Bearer <token>' \
--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 grows up as the camera slowly pushes in.",
"duration": 6,
"resolution": "1080P",
"prompt_optimizer": true,
"callback_url": "https://your-domain.com/api/video/callback",
"aigc_watermark": false
}'Response
🟢 200 Success
Response Body
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Required | |
base_resp | object | Required | |
└ status_code | integer | Required | |
└ status_msg | string | Required |
Response Example
json
{
"task_id": "106916112212032",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}