Skip to main content
POST
Video Generation

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Headers

Content-Type
enum<string>
default:application/json
required

Media type of the request body. Set to application/json to ensure the request data is in JSON format.

Available options:
application/json

Body

application/json
model
enum<string>
required

Model name. Available value: MiniMax-Hailuo-02.

Note: The first/last frame generation feature does not support 512P resolution.

Available options:
MiniMax-Hailuo-02
last_frame_image
string
required

Use the specified image as the last frame of the video. Supports public URL or Base64-encoded Data URL (data:image/jpeg;base64,...)

  • Image requirements:
    • Format: JPG, JPEG, PNG, WebP
    • Size: less than 20MB
    • Dimensions: Short side greater than 300px, aspect ratio between 2:5 and 5:2

⚠️ The generated video dimensions follow the first frame image. When the first and last frame images have different dimensions, the model crops the last frame image based on the first frame.

prompt
string

Text description of the video, up to 2000 characters. For MiniMax-Hailuo-02, the [command] syntax is supported for camera movement control. You can add camera movement commands in the prompt using the [command] format for precise camera control.

  • 15 supported camera movement commands:

    • Pan left/right: [Pan left], [Pan right]
    • Tilt left/right: [Tilt left], [Tilt right]
    • Dolly: [Dolly in], [Dolly out]
    • Pedestal: [Pedestal up], [Pedestal down]
    • Tilt up/down: [Tilt up], [Tilt down]
    • Zoom: [Zoom in], [Zoom out]
    • Others: [Shake], [Follow], [Static]
  • Usage rules:

    • Combined movements: Multiple commands within the same pair of [] take effect simultaneously, e.g. [Tilt left, Pedestal up]. It is recommended to combine no more than 3 commands.
    • Sequential movements: Commands appearing sequentially in the prompt take effect in order, e.g. "...[Dolly in], then...[Dolly out]"
    • Natural language: Natural language descriptions of camera movements are also supported, but using standard commands yields more accurate results.
first_frame_image
string

Use the specified image as the first frame of the video. Supports public URL or Base64-encoded Data URL (data:image/jpeg;base64,...)

  • Image requirements:
    • Format: JPG, JPEG, PNG, WebP
    • Size: less than 20MB
    • Dimensions: Short side greater than 300px, aspect ratio between 2:5 and 5:2

⚠️ The generated video dimensions follow the first frame image.

prompt_optimizer
boolean

Whether to automatically optimize the prompt. Defaults to true. Set to false for more precise control.

duration
integer

Video duration in seconds. Defaults to 6. Available values for first/last frame generation depend on resolution:

resolution
enum<string>

Video resolution. First/last frame generation supports 768P and 1080P:

Available options:
768P,
1080P
callback_url
string

Callback URL for receiving task status update notifications. You can configure a callback via the callback_url parameter to receive asynchronous notifications of task status updates.

Address verification: After configuration, the MiniMax server sends a POST request to callback_url with a challenge field in the request body. Your server must echo back the challenge value within 3 seconds to complete verification. Status updates: After successful verification, whenever the task status changes, MiniMax pushes the latest task status to this URL. The pushed data structure matches the response body of the query video generation task API.

The callback returns the following "status" values:

  • "processing" - Generating
  • "success" - Success
  • "failed" - Failed
aigc_watermark
boolean

Whether to add a watermark to the generated video. Defaults to false.

Response

200 - application/json
task_id
string

ID of the video generation task, used for subsequent task status queries.

base_resp
object