POST
/
v1
/
ai
/
image-to-video
/
minimax-hailuo-02-768p
Create a video from text/image - MiniMax Hailuo-02 768p
curl --request POST \
  --url https://api.freepik.com/v1/ai/image-to-video/minimax-hailuo-02-768p \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '{
  "webhook_url": "https://www.example.com/webhook",
  "prompt": "A beautiful sunset over the mountains with birds flying in the sky",
  "prompt_optimizer": true,
  "first_frame_image": "https://img.freepik.com/free-photo/beautiful-sunset-over-mountains_123456-7890.jpg",
  "last_frame_image": "https://img.freepik.com/free-photo/beautiful-sunset-over-mountains_123456-7890.jpg",
  "duration": 6
}'
{
"data": {
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}
}

Authorizations

x-freepik-api-key
string
header
required

Your Freepik API key. Required for authentication. Learn how to obtain an API key

Body

application/json
prompt
string
required

Description of the video. Note: It should be less than 2000 characters.

Maximum length: 2000
Example:

"A beautiful sunset over the mountains with birds flying in the sky"

first_frame_image
string
required

The model will use the image passed in this parameter as the first frame to generate a video. Supported formats: URL of the image or base64 encoding of the image. Image specifications: format must be JPG, JPEG, or PNG; aspect ratio should be greater than 2:5 and less than 5:2; the shorter side must exceed 300 pixels; file size must not exceed 20MB.

Example:

"https://img.freepik.com/free-photo/beautiful-sunset-over-mountains_123456-7890.jpg"

webhook_url
string<uri>

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

Example:

"https://www.example.com/webhook"

prompt_optimizer
boolean
default:true

Whether to use the prompt optimizer. If true, the model will automatically optimize the incoming prompt to improve the generation quality.

last_frame_image
string

The model will use the image passed in this parameter as the last frame to generate a video. Supported formats: URL of the image or base64 encoding of the image. Image specifications: format must be JPG, JPEG, or PNG; aspect ratio should be greater than 2:5 and less than 5:2; the shorter side must exceed 300 pixels; file size must not exceed 20MB.

Example:

"https://img.freepik.com/free-photo/beautiful-sunset-over-mountains_123456-7890.jpg"

duration
enum<integer>
default:6

Video length in seconds

Available options:
6,
10
Example:

6

Response

OK - Task created successfully

data
object
required
Example:
{
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}