Skip to content

generate_video

Generate a video from a text description and/or a first-frame image using MiniMax Hailuo models. Video generation typically takes 1–5 minutes.

ParameterTypeRequiredDefaultDescription
promptstring✓*Text description of the video (max 2,000 chars). Supports camera commands (see below).
modelstringT2V-01Model: MiniMax-Hailuo-2.3, MiniMax-Hailuo-02, T2V-01-Director, T2V-01
first_frame_imagestring✓*Base64 data URI or public URL for the first frame of the video
durationinteger6Duration in seconds: 6 or 10
resolutionstringOutput resolution: 720P, 768P, 1080P
prompt_optimizerbooleantrueAuto-optimize the prompt for better results

* At least one of prompt or first_frame_image is required.

When using MiniMax-Hailuo-2.3 or MiniMax-Hailuo-02, you can embed camera direction commands in the prompt:

CommandEffect
[Pan left]Camera pans left
[Pan right]Camera pans right
[Zoom in]Camera zooms in
[Zoom out]Camera zooms out
[Tracking shot]Camera follows the subject
[Aerial shot]Bird’s-eye overhead view
[Arc shot]Camera arcs around the subject
Step 1: generate_video(prompt="...") → returns task_id
Step 2: query_generation_task(task_id="...") → returns status + download URL when complete

Poll every 30–60 seconds until the status is Success.

Text-to-video:

“A golden retriever playing fetch on a beach at sunset, slow motion.”

With camera commands and resolution:

“Generate a 10-second video of a cat jumping off a diving board [Tracking shot], then splashing into the pool [Zoom in]. Use MiniMax-Hailuo-2.3 at 1080P.”

Image-to-video:

“Create a video from this image: [attach image] — the person starts walking forward through a forest.”

Combined pipeline (image → video):

Step 1: generate_image(prompt="A futuristic car on a neon-lit highway, 16:9")
Step 2: generate_video(prompt="The car starts driving forward through the city",
first_frame_image="<base64 from step 1>")
Step 3: query_generation_task(task_id="<from step 2>")

Returns a text part with the task_id and model used, and instructions to poll with query_generation_task.

  • T2V-01 and T2V-01-Director are earlier generation models; MiniMax-Hailuo-2.3 is the latest and highest quality.
  • Camera commands are only supported on Hailuo models (MiniMax-Hailuo-2.3, MiniMax-Hailuo-02).
  • The MINIMAX_REQUEST_TIMEOUT_MS env var controls how long the MCP client waits for the initial API call (not the full generation time).