Get API Key Get API
Docs

MiniMax-Hailuo-02 Video Generation

- Asynchronous processing mode, returns task ID for subsequent queries

  • Supports text-to-video, image-to-video (first frame/last frame)
  • Supports 5 and 10 second durations, multiple resolutions available
  • Supports automatic prompt optimization and watermark control

Request example

curl --request POST \
  --url https://api.openveer.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "MiniMax-Hailuo-02",
    "prompt": "A cute cat running on the grass",
    "duration": 5,
    "resolution": "768p",
    "prompt_optimizer": true,
    "fast_pretreatment": false,
    "watermark": false
  }'

Response example

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}

Authorization

Authorization string

All API endpoints require Bearer Token authentication

Get API Key:

Visit API Key Management Page to get your API Key

Add to request header:

Authorization: Bearer YOUR_API_KEY

Request Parameters

model string

Video generation model name

Fixed value: MiniMax-Hailuo-02

nsfw_check boolean

Whether to run content moderation before submitting the video task.

  • true: use omni-moderation-latest to review prompts and input images
  • false or omitted: do not send a moderation request, adding no moderation cost or latency (default)
prompt string

Video content description

Describe the scene, actions, style, etc. in detail for better generation results

Example: "A cute cat running on the grass"

duration integer

Video duration (seconds)

Options:

  • 5 - 5 second video
  • 10 - 10 second video

Default: 5

Warning



1080p Limitation: When using 1080p resolution, only 5 second duration is supported

resolution string

Video resolution

Options:

  • 512p - Standard definition
  • 768p - High definition
  • 1080p - Full HD (only supports 5 second duration)

Default: 768p

prompt_optimizer boolean

Whether to automatically optimize the prompt

When enabled, the system will automatically optimize your prompt for better generation results

Default: true

fast_pretreatment boolean

Whether to reduce prompt optimization time

Enabling this can speed up processing, but may slightly affect optimization quality

Default: false

watermark boolean

Whether to add watermark

Default: false

first_frame_image string

Video first frame image

Supports two formats:

  • Public URL: https://example.com/start.jpg
  • Base64 encoded: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABg...

Used to specify the starting frame of the video

last_frame_image string

Video last frame image

Supports two formats:

  • Public URL: https://example.com/end.jpg
  • Base64 encoded: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABg...

Used to specify the ending frame of the video

Parameter Limitations

Limitation Description
Duration Only supports 5 or 10 seconds
1080p Resolution Only supports 5 second duration
Image Format Supports public URL or Base64 encoded (data:image/jpeg;base64,...)

Resolution and Duration Combinations

Resolution Supported Duration Notes
512p 5s, 10s All supported
768p 5s, 10s All supported
1080p 5s 10s not supported

Response

code integer

Response status code, 200 on success

data array
Response data array
status string

Task status, submitted on initial submission

task_id string

Unique task identifier for querying task status and results

Use Cases

Case 1: Quick Text-to-Video Generation

{
  "model": "MiniMax-Hailuo-02",
  "prompt": "A cute cat running on the grass in bright sunshine"
}

Case 2: Generate High-Quality 1080p Video

{
  "model": "MiniMax-Hailuo-02",
  "prompt": "City night scene, neon lights flashing, traffic flowing",
  "duration": 5,
  "resolution": "1080p",
  "prompt_optimizer": true,
  "watermark": false
}

Case 3: Generate Video from First Frame Image

{
  "model": "MiniMax-Hailuo-02",
  "prompt": "Person slowly turning around with a smile",
  "duration": 5,
  "resolution": "768p",
  "first_frame_image": "https://example.com/portrait.jpg"
}

Case 4: Transition Video with First and Last Frame Control

{
  "model": "MiniMax-Hailuo-02",
  "prompt": "Scene gradually transitions from day to night, sky color changing",
  "duration": 10,
  "resolution": "768p",
  "first_frame_image": "https://example.com/day.jpg",
  "last_frame_image": "https://example.com/night.jpg",
  "prompt_optimizer": true
}

Case 5: Fast Preprocessing Mode

{
  "model": "MiniMax-Hailuo-02",
  "prompt": "Waves crashing on the beach at sunset",
  "duration": 5,
  "resolution": "768p",
  "prompt_optimizer": true,
  "fast_pretreatment": true
}
Note

Query Task Results

Video generation is an asynchronous task that returns a task_id upon submission. Use the Get Task Status endpoint to query generation progress and results.

This documentation is built and hosted on Mintlify, a developer documentation platform.