Skip to content

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)

ParameterTypeRequiredDescription
modelstringRequiredModel name. Only supports MiniMax-Hailuo-02 (Note: First and last frame generation does not support 512P resolution)
last_frame_imagestringRequiredEnd 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_imagestringRequiredStart 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
promptstringRequiredText description of the video, maximum 2000 characters.
durationintegerRequiredVideo duration (seconds). Available values: 6 or 10 (10 seconds only supports 768P)
resolutionstringRequiredVideo resolution. Optional values: 768P (default, supports 6s/10s), 1080P (only supports 6s)
prompt_optimizerbooleanRequiredWhether to automatically optimize the prompt. Set to false for more precise control
callback_urlstringRequiredCallback URL to receive task status update notifications. Once configured, you will receive asynchronous notifications of task status changes
aigc_watermarkbooleanRequiredWhether 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

ParameterTypeRequiredDescription
task_idstringRequired
base_respobjectRequired
  └ status_codeintegerRequired
  └ status_msgstringRequired

Response Example

json
{
  "task_id": "106916112212032",
  "base_resp": {
    "status_code": 0,
    "status_msg": "success"
  }
}