Skip to content

Start/End Frame Video

Overview

  • API: Start/End Frame Video
  • Description: Generate a short video by specifying a start frame and an end frame, using text description. The video is generated based on the first frame resolution.
  • Model: MiniMax-Hailuo-02 (note: start/end frame generation does not support 512P resolution).

Authentication

  • Use Bearer Token in the request header: Authorization: Bearer <token>.

Request Parameters

  • Request Content-Type: application/json

  • Request body fields:

    • model (string, required)

      • Model name: MiniMax-Hailuo-02.
    • prompt (string)

      • Text description for the video, up to 2000 characters. Supports bracketed directives for camera motion control (see directive list below).
    • prompt_optimizer (boolean, optional, default true)

      • Whether to auto-optimize the prompt. Set to false for more precise control.
    • fast_pretreatment (boolean, optional, default false)

      • Whether to shorten prompt optimization runtime, effective only for MiniMax-Hailuo-02.
    • duration (integer, required)

      • Video duration in seconds. Supported values depend on model and resolution:

        Model768P1080P
        MiniMax-Hailuo-026 or 106
    • resolution (string, required)

      • Video resolution (P uppercase), available values as shown above.
    • first_frame_image (string, required)

      • Starting frame image URL or Base64 data URL. Image requirements: JPG/JPEG/PNG/WebP, under 20MB, short side > 300px, aspect ratio between 2:5 and 5:2. The generated video size follows the first frame image.
    • last_frame_image (string, required)

      • Ending frame image URL or Base64 data URL. If the first and last frames differ in size, the model will crop the last frame to match the first frame.
    • callback_url (string, optional)

      • Callback URL for task status updates. After configuration, the server verifies the URL and pushes status updates when the task changes, with payload matching the query API response. Status values include processing, success, and failed.

Camera Motion Directive Summary

  • Supported directives include: [左移], [右移], [左摇], [右摇], [推进], [拉远], [上升], [下降], [上摇], [下摇], [变焦推近], [变焦拉远], [晃动], [跟随], [固定].
  • Usage rules: multiple directives inside the same [] apply simultaneously, recommended up to 3; directives are applied in order of appearance; natural language is also supported, but standard directives provide more controllable results.

Request Example

bash
curl -X POST "https://api.gpt.ge/task/minimax/v1/video_generation" \
  -H "Authorization: Bearer $YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-Hailuo-02",
    "prompt": "A little girl grows up from childhood to adulthood",
    "duration": 6,
    "resolution": "1080P",
    "first_frame_image": "https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg",
    "last_frame_image": "https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg"
  }'

Request Body Example

json
{
  "model": "MiniMax-Hailuo-02",
  "prompt": "A little girl grows up from childhood to adulthood",
  "duration": 6,
  "resolution": "1080P",
  "first_frame_image": "https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg",
  "last_frame_image": "https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg"
}

Success Response Example

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

Response Fields

  • task_id (string): task ID to query status and results.
  • base_resp (object): basic response information, includes status_code (integer) and status_msg (string).

Notes

  • Make sure required fields are included; missing required parameters may prevent the model name from being recognized.
  • Start/end frame generation uses the first frame as the primary resolution reference, so ensure your uploaded images meet the format and size requirements.