Skip to content
MiniMax · MiniMax Hailuo

MiniMax-Hailuo-02 API

Generate videos from text or frame images with MiniMax-Hailuo-02 on Openrouter API.

Video generationVideoAsync task
Model id
MiniMax-Hailuo-02

MiniMax-Hailuo-02 API pricing

All prices in USD. Openrouter API rates compared with the official list price for the same unit.

OptionOpenrouter APIOfficialSave
1080P$0.088$0.10−12%
512P$0.01144$0.013−12%
768P$0.044$0.05−12%

Prices are per second.

What is MiniMax-Hailuo-02?

MiniMax-Hailuo-02 is a video generation model from MiniMax for building text-to-video and image-to-video workflows on Openrouter API. Describe the scene, actions, and style in a required prompt, or supply first-frame and last-frame images to guide the video's start and end. It supports 5- and 10-second clips at 512p and 768p, plus 5-second clips at 1080p. Controls include automatic prompt optimization, faster preprocessing, optional pre-submission moderation, and watermark settings.

Submit requests to Openrouter API's video generation endpoint with your API key. Processing is asynchronous: submission returns a task ID that you use to query progress and results. Openrouter API charges pay-as-you-go, billing only successful requests. Rates are $0.01144 per second for 512P, $0.044 per second for 768P, and $0.088 per second for 1080P. The default configuration is about 12% below the developer's list price.

MiniMax-Hailuo-02 highlights

Text and Image Inputs

Generate video from a text prompt, or provide first-frame and last-frame images using public URLs or Base64-encoded data.

Resolution and Duration Choices

Choose 512p or 768p for 5- or 10-second videos. Use 1080p for 5-second videos only.

Prompt Optimization Controls

Automatic prompt optimization is enabled by default. Faster preprocessing can reduce optimization time, with a possible slight effect on optimization quality.

Watermark and Moderation Controls

Choose whether to add a watermark or run moderation before submission. Both options default to false.

How to call the MiniMax-Hailuo-02 API in 4 steps

  1. 01

    Get an API key

    Sign in to Openrouter API, top up from $50, and create an sk-ora key in the console.

  2. 02

    Set the base URL

    Use https://openrouterapi.ru/v1 as the base URL in your SDK or HTTP client.

  3. 03

    Send the request

    Call POST /v1/videos/generations with "model": "MiniMax-Hailuo-02" and the parameters below.

  4. 04

    Handle the response

    The response contains a task_id. Poll GET /v1/tasks/{task_id} until the status is completed, then download the result URLs.

curl --request POST \
  --url https://openrouterapi.ru/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
  }'

Parameters

ParameterTypeRequiredDefaultDescription
modelstringRequired—Video generation model name
nsfw_checkbooleanOptionalfalseWhether to run content moderation before submitting the video task.
promptstringRequired—Video content description
durationintegerOptional5Video duration (seconds)
resolutionstringOptional768pVideo resolution
prompt_optimizerbooleanOptionaltrueWhether to automatically optimize the prompt
fast_pretreatmentbooleanOptionalfalseWhether to reduce prompt optimization time
watermarkbooleanOptionalfalseWhether to add watermark
first_frame_imagestringOptional—Video first frame image
last_frame_imagestringOptional—Video last frame image

What you can build with MiniMax-Hailuo-02

Prompt-to-Video Tools

Build a video creation interface where users describe scenes, actions, and visual styles to generate short clips.

Still-Image Animation

Let users supply a starting image and a prompt to create a video guided by that first frame.

Frame-Guided Transitions

Create transition workflows that use supplied first and last images to guide the beginning and ending of a clip.

Short Full HD Clips

Build a workflow for generating 5-second 1080p clips, with explicit controls for prompt optimization and watermark inclusion.

Tips for better results

  • 01

    Describe the Scene Clearly

    Include scene details, actions, and style in the required prompt. Leave prompt_optimizer enabled when you want automatic prompt optimization.

  • 02

    Match Resolution to Duration

    Set resolution and duration explicitly rather than relying on the 768p and 5-second defaults. For 10-second clips, choose 512p or 768p; 1080p supports only 5 seconds.

  • 03

    Plan Per-Second Costs

    Use 512p at $0.01144 per second when that resolution meets your needs. Higher-resolution options cost $0.044 per second for 768P and $0.088 per second for 1080P.

  • 04

    Track the Returned Task

    Store the task_id returned by submission and query the Get Task Status endpoint for progress and results. Do not treat the initial submitted status as a completed video.

Limits and things to know

  • Video generation is asynchronous and requires subsequent task-status queries.

  • Only 5- and 10-second durations are supported, and 1080p is limited to 5 seconds.

  • First-frame and last-frame images must be supplied as public URLs or Base64-encoded data.

MiniMax-Hailuo-02 API FAQ

How much does MiniMax-Hailuo-02 cost on Openrouter API?

Openrouter API pricing is $0.01144 per second for 512P, $0.044 per second for 768P, and $0.088 per second for 1080P. Billing is pay-as-you-go and applies only to successful requests; the default configuration is about 12% below the developer's list price.

How do I call MiniMax-Hailuo-02 through the API?

Send a POST request to https://openrouterapi.ru/v1/videos/generations with Bearer Token authentication, the model value MiniMax-Hailuo-02, and a required prompt. The response returns a task_id for querying generation progress and results.

Does MiniMax-Hailuo-02 support image-to-video generation?

Yes. Supply first_frame_image, last_frame_image, or both to guide the starting and ending frames, using public image URLs or Base64-encoded data.

What resolutions and video lengths are supported?

512p and 768p support 5- and 10-second videos. 1080p supports only 5-second videos; the defaults are 768p resolution and 5 seconds.

Can I control prompt optimization, moderation, and watermarks?

Yes: prompt_optimizer defaults to true, while fast_pretreatment, nsfw_check, and watermark default to false. Enabling fast_pretreatment can reduce prompt optimization time but may slightly affect optimization quality; enabling nsfw_check reviews prompts and input images with omni-moderation-latest.

Can I use MiniMax-Hailuo-02 videos commercially?

Commercial use is subject to the model developer's terms. Check the applicable MiniMax terms before using generated videos in a commercial product or campaign.

Related models

Depth: 250+ models · Minimum top-up $50

Start building with MiniMax-Hailuo-02

One key, pay as you go from $50, billed only for successful requests.