models

MiniMax: Hailuo 02

Markdown · JSON

MiniMax: Hailuo 02

Hailuo 02 creates video from text or a first-frame image and supports a documented first-and-last-frame workflow. Camera commands, prompt optimization and mode-specific duration and resolution choices help shape the intended shot.

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

Hailuo 02 is MiniMax’s video model for text-driven scenes, image animation and a first-and-last-frame workflow. A written brief describes the subject, action and camera, while supplied frame images can establish the visual starting point or the transition’s destination. Choose the generation mode according to the material you already have and the part of the shot you need to control.

For text-to-video, describe a coherent action with a readable setting and viewpoint. A scene might show a small sailing boat passing a pier while the camera follows from shore. Specify what moves, which details should remain visible and how the shot ends. Keep the brief focused on observable events rather than a list of unrelated visual qualities.

For image-to-video, prepare a first frame with the intended subject and framing already established. The maker accepts JPG, JPEG, PNG and WebP images smaller than 20 MB, with a short edge greater than 300 pixels and an aspect ratio between 2:5 and 5:2. Use an image whose important contours and features are visible, then describe the motion to develop from it.

Hailuo 02 also has a documented first-and-last-frame mode. Prepare the two images as the intended opening and closing states of one sequence, and describe how the scene moves between them. The first frame determines the framing; the maker states that a differently sized last frame is cropped to match it. Align the images’ composition in advance when a subject must remain visible through the transition.

The prompt can contain up to 2,000 characters. Hailuo 02 supports bracketed camera commands including push, pull, truck, pan, pedestal, tilt, zoom, tracking and a static shot. Commands placed together in a bracket request simultaneous movement; commands placed at different points in the description request a sequence. The maker recommends combining no more than three movements, so choose the camera action that makes the subject easier to read.

Duration and resolution are linked to the mode. Text-to-video documents six or ten seconds at 768P and six seconds at 1080P. Image-to-video also documents 512P for six or ten seconds. The first-and-last-frame workflow documents 768P for six or ten seconds and 1080P for six seconds. Select a supported combination for the shot instead of transferring one mode’s resolution choices to every other mode.

Automatic prompt optimization is a documented control and is enabled by default in the maker’s workflow. Retain its setting when comparing versions, because a rewritten brief changes what the model receives. Keep the exact text, reference frames and selected output settings with the generated clip so a revision can target the action or framing that needs improvement.

Review the whole completed sequence: the opening composition, continuity of the subject, timing of the action and final frame. For a transition, check both endpoints and the motion between them. Save the actual video for editing, together with the prompt and references; use the next revision to address a concrete visual problem such as an obscured detail, an abrupt camera move or an ending that arrives too early.

Ailoot Ultra · Video POST /v1/videos minimaxi-hailuo-02

minimaxi-hailuo-02

MiniMax /minimaxi-hailuo-02

Overview

Hailuo 02 creates video from text or a first-frame image and supports a documented first-and-last-frame workflow. Camera commands, prompt optimization and mode-specific duration and resolution choices help shape the intended shot.

Accepted inputs
Text · Images
Results
Video

Available in Ailoot · inputs & methods

Ailoot Ultra · Video POST /v1/videos
Input types
text, image
Output types
video
FieldTypeRequirementValues & limitsDefault
FieldmodelTypestringRequirementRequiredValues & limits
minimaxi-hailuo-02
Conditions: Use the exact Ailoot model selector.
Default—
FieldpromptTypestringRequirementRequiredValues & limits
Conditions: Describe the scene and motion.
Default—
FielddurationTypeintegerRequirementOptionalValues & limits
6, 10
Conditions: Send one of the listed duration values; no default is asserted.
Default—
Fieldend_imageTypestringRequirementOptionalValues & limits
Conditions: An end frame applies only in a supported image input mode.
Default—
FieldimageTypestring or array<string>RequirementOptionalValues & limits
Conditions: Use an actual publicly reachable image URL or a base64 image string; no maximum image count is asserted here.
Default—
FieldresolutionTypestringRequirementOptionalValues & limits
512P, 768P, 1080P
Conditions: Send one of the listed resolution values; no default is asserted.
Default—
Method parameters and lifecycle
ParameterContract
Parametercontent_typeContractapplication/json
ParameterrequiredContractmodel, prompt
ParameteroptionalContractduration, end_image, image, resolution
Parametermaterial_typesContracttext, image
ParameterconditionsContractUse the exact Ailoot model selector., Describe the scene and motion., Send one of the listed duration values; no default is asserted., An end frame applies only in a supported image input mode., Use an actual publicly reachable image URL or a base64 image string; no maximum image count is asserted here., Send one of the listed resolution values; no default is asserted.

Method aliases: /v1/videos/generations

Lifecycle: submit_once_poll_original

GET /v1/videos/{request_id}

GET /v1/videos/generations/{request_id}

GET /v1/videos/{request_id}/content

GET /v1/media/assets

GET /v1/media/assets/{asset_id}

Pricing

How the final charge is calculated

The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode
Not specified When fast mode is selected
Flex mode
Not specified When flex mode is selected
Maximum reasoning effort
Not specified When maximum reasoning effort uses the default adjustment

Estimated rates for comparison

Prices by configuration

Match each charge to the conditions shown. Use one rate for each set of alternative configurations.

ConfigurationRate scheduleForecast quantityCharge
ConfigurationBase token ratesRate scheduleBase rateForecast quantity—Charge
Input · Input tokens · Estimate for comparison only — / 1K tokens
Output · Output tokens · Estimate for comparison only — / 1K tokens
Input · Cache read · Estimate for comparison only — / 1K tokens
Input · Cache write · Estimate for comparison only — / 1K tokens
Input · Cache write, 1 hour · Estimate for comparison only — / 1K tokens
ConfigurationEstimated generation costRate schedule—Forecast quantityone generation estimateCharge
Output · Estimated generation cost · Estimate for comparison only $0.2 estimate before generation

This estimate is not an additional charge or a fixed rate for the completed generation.

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →

Example requests

Ailoot Ultra · Video

curl · create once and retain receiptRead the original taskSave every completed owned asset
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
cat > request.json <<'JSON'
{
  "model": "minimaxi-hailuo-02",
  "prompt": "A cat is walking on grass."
}
JSON
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
# Create once; retain id, polling_url, original task identifiers and every header.
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_STATUS'
import json,os,subprocess
from pathlib import Path
from urllib.parse import urljoin,urlsplit
r=json.loads(Path("result.json").read_text())
u=urljoin("https://api.ailoot.ai",r["polling_url"])
p=urlsplit(u)
if p.scheme!="https" or p.netloc!="api.ailoot.ai" or p.username or p.password:
    raise SystemExit("Unexpected returned polling URL; preserve the response")
subprocess.run(["curl","--fail-with-body","--silent","--show-error",u,"-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"],"-D","status-headers.txt","-o","status.json"],check=True)
# Read this same original polling_url again while pending.
# Preserve unknown/result_pending_check; do not repeat creation.
PY_STATUS
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_ASSETS'
import json,os,subprocess
from pathlib import Path
from urllib.parse import urljoin,urlsplit
r=json.loads(Path("status.json").read_text())
roles={}
def visit(v,path=""):
    if isinstance(v,dict):
        for k,x in v.items(): visit(x,path+"/"+k)
    elif isinstance(v,list):
        for i,x in enumerate(v): visit(x,path+"/"+str(i))
    elif isinstance(v,str):
        u=urljoin("https://api.ailoot.ai",v); p=urlsplit(u)
        if p.scheme=="https" and p.netloc=="api.ailoot.ai" and not p.username and not p.password and p.path.startswith("/v1/media/assets/") and p.path.endswith("/content"):
            roles.setdefault(u,[]).append(path)
visit(r)
if not roles: raise SystemExit("No completed owned assets; retain the original status")
manifest=[]
for i,(u,paths) in enumerate(roles.items()):
    target=Path(f"asset-{i}.bin")
    subprocess.run(["curl","--fail-with-body","--silent","--show-error",u,"-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"],"-o",str(target)],check=True)
    raw=target.read_bytes()
    if not raw: raise SystemExit("Empty asset; retain original status and metadata")
    ext="glb" if raw[:4]==b"glTF" else "png" if raw[:8]==b"\x89PNG\r\n\x1a\n" else "jpg" if raw[:3]==b"\xff\xd8\xff" else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "mp4" if raw[4:8]==b"ftyp" else "bin"
    name=f"asset-{i}.{ext}"
    if target.name!=name: target.rename(name)
    manifest.append({"file":name,"response_paths":paths,"bytes":len(raw)})
Path("asset-manifest.json").write_text(json.dumps(manifest,indent=2))
print("Saved",len(manifest),"unique owned assets; every response role retained")
PY_ASSETS

Receive and save results

Ailoot Ultra · Video

  • GET /v1/videos/{request_id}
  • GET /v1/videos/generations/{request_id}
  • GET /v1/videos/{request_id}/content
  • GET /v1/media/assets
  • GET /v1/media/assets/{asset_id}
Keep all completed results

Save every completed video or returned file; retrieve every actual returned asset URL.

Retain the complete response and headers, original identifiers, every actual output and all usage/accounting fields. Save each unique owned asset and retain every role pointing to it.

If the original response needs checking

Keep the returned public task or operation id and all headers. Read only the original task; unknown or result_pending_check does not authorize another creation.

Response fields
FieldType
FieldidTypestring
Fieldpolling_urlTypestring
Fieldprovider_task_idTypestring
Fieldtask_idTypestring
FieldstatusTypestring
Fieldvideo_urlTypestring

Aliases

Model aliases

Ailoot Ultra minimaxi-hailuo-02

Method path aliases

/v1/videos/generations

Related caller IDs

minimaxi-hailuo-02

FAQ · MiniMax: Hailuo 02
What inputs and results are available?

POST /v1/videos · minimaxi-hailuo-02: text, image → video

Which fields does the request use?

POST /v1/videos · minimaxi-hailuo-02: model, prompt, duration, end_image, image, resolution

More details

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription
Choose a discounted plan for your regular requests.
Promo code: up to 50% off
Enter your code at checkout. The price updates to reflect the current promotion.
Spending in your history
The model, tokens and amount are recorded for each request.

Choose a subscription · View model prices

Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application
Add text, image, video and audio generation to paid features in your service.
Reseller licence
Send a description of your project and how you provide access. Request written terms for use and resale.
Documents on the website
The service offer, licence agreement and data processing policy are available before you connect.

Request a reseller licence · Service offer and licence agreement