⌘K

Hailuo 2.0 - Image to Video

minimax_hailuo_02_i2v

Hailuo 02 I2V transforms first and last frame images into dynamic videos with intelligent motion synthesis, supporting 6-10 second duration.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Value: minimax_hailuo_02_i2v


last_frame_image string

Use specified image as the video’s ending frame. 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

⚠️ Video dimensions follow the first frame image. When the first and last frame images have different dimensions, the model will crop the last frame image based on the first frame.


prompt string

Text description for video generation, maximum 2000 characters. Supports camera movement control using [instruction] syntax for precise camera control.

Supported 15 camera instructions:
Pan: [pan left], [pan right]
Tilt: [tilt left], [tilt right]
Push/Pull: [push in], [pull back]
Rise/Lower: [rise], [lower]
Up/Down tilt: [tilt up], [tilt down]
Zoom: [zoom in], [zoom out]
Other: [shake], [follow], [static]

Usage rules:
Combined movements: Multiple instructions within the same [] will take effect simultaneously, e.g. [tilt left, rise], recommend no more than 3 combined
Sequential movements: Instructions appearing in sequence in the prompt will take effect in order, e.g. ”…[push in], then…[pull back]“
Natural language: Camera movements can also be described in natural language, but standard instructions provide more accurate responses


first_frame_image string required

Use specified image as the video’s starting frame. 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

⚠️ Video dimensions follow the first frame image.


prompt_optimizer boolean

Whether to automatically optimize prompt, default is true. Set to false for more precise control

Default: true


duration integer

Video duration in seconds. Available values depend on resolution:

ResolutionAvailable duration
768P6 or 10
1080P6

Default: 6


resolution enum<string>

Video resolution

Image-to-video:

DurationAvailable resolution
6s512P, 768P (default), 1080P
10s512P, 768P (default)

Start-end frame generation:

DurationAvailable resolution
6s768P (default), 1080P
10s768P

Options: 512P, 768P, 1080P


callback_url string

Callback URL for receiving task status update notifications. Supports configuring callbacks via the callback_url parameter to receive asynchronous notifications of task status updates


aigc_watermark boolean

Whether to add watermark to the generated video

Default: false


Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.

Response Format

error object

Error information, only present when status is failed

code integer

Error code

error_message string

Detailed error message


output array

Generation results, only present when status is completed

content array

List of generated content

type string

Resource type, e.g. video, image

url string

Generated content URL


usage object

Usage statistics, only present when status is completed

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information


Error Codes

Error CodeDescription
010004095Internal generation error
010004096Result parsing error
010004097HTTP error response
010004098Status check error
010004099Task creation error