Video

MiniMax Video Generation

Generate videos from text or images using MiniMax's Hailuo models. Supports text-to-video, image-to-video, and subject-driven generation.

Supported Models

ModelProvider
T2V-01MiniMax
I2V-01MiniMax
S2V-01MiniMax
MiniMax-Hailuo-2.3MiniMax
MiniMax-Hailuo-2.3-FastMiniMax
MiniMax-Hailuo-02MiniMax

Model Constraints

Legacy models (T2V-01, I2V-01, S2V-01) only support 6 seconds at 720P. Duration and resolution parameters are ignored for these models. Hailuo models support 6s or 10s duration, but 1080P is only available at 6s.

Text-to-Video

POST/v1/videos/minimax/generations

Body Parameters

modelstringrequired

Model ID (T2V-01, S2V-01, MiniMax-Hailuo-2.3, MiniMax-Hailuo-2.3-Fast, or MiniMax-Hailuo-02)

promptstringrequired

Text description of the desired video (max 2000 chars)

first_frame_imagestring

URL or base64 of the first frame image (for I2V models)

durationinteger

Video duration in seconds (Hailuo models only)

Options: 6, 10

resolutionstring

Output resolution (Hailuo models only)

Options: 512P, 720P, 768P, 1080P

prompt_optimizerboolean

Auto-optimize the prompt before generation (Hailuo only)

Default: true

fast_pretreatmentboolean

Enable fast pretreatment mode (Hailuo-2.3/02 only)

cURL — Text-to-Video
curl -X POST https://api.metriqual.com/v1/videos/minimax/generations \
  -H "Authorization: Bearer mql_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-Hailuo-2.3",
    "prompt": "Ocean waves crashing on a sandy beach at sunset",
    "duration": 6,
    "resolution": "1080P"
  }'
TypeScript SDK
const video = await mql.video.create({
  model: 'MiniMax-Hailuo-2.3',
  prompt: 'Ocean waves crashing on a sandy beach at sunset',
  duration: 6,
  resolution: '1080P'
});

console.log(video.task_id);
Python SDK
video = mql.video.create(
    model="MiniMax-Hailuo-2.3",
    prompt="Ocean waves crashing on a sandy beach at sunset",
    duration=6,
    resolution="1080P",
)
print(video["task_id"])

# Or wait for completion automatically
result = mql.video.query_and_wait(video["task_id"])
download = mql.video.download_video(result["file_id"])

Image-to-Video

Convert a static image into a dynamic video. Provide the image URL as first_frame_image along with a motion prompt.

cURL — Image-to-Video
curl -X POST https://api.metriqual.com/v1/videos/minimax/generations \
  -H "Authorization: Bearer mql_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "I2V-01",
    "prompt": "The camera slowly pans right",
    "first_frame_image": "https://example.com/photo.jpg"
  }'
TypeScript SDK
const video = await mql.video.createFromImage({
  model: 'I2V-01',
  prompt: 'The camera slowly pans right',
  first_frame_image: 'https://example.com/photo.jpg'
});
Python SDK
video = mql.video.create(
    model="I2V-01",
    prompt="The camera slowly pans right",
    first_frame_image="https://example.com/photo.jpg",
)

Query Status & Download

GET/v1/videos/query/:task_id
GET/v1/videos/download/:file_id

MiniMax video generation is asynchronous. After submitting a request, poll the query endpoint with the returned task_id to check progress. Once complete, download using the file_id.

TypeScript SDK
// Poll until complete
const status = await mql.video.queryVideoStatus(video.task_id);

if (status.status === 'Success') {
  const result = await mql.video.downloadVideo(status.file_id);
  console.log('Download URL:', result.download_url);
}
Python SDK
# Poll until complete
status = mql.video.query_video_status(video["task_id"])
if status["status"] == "Success":
    result = mql.video.download_video(status["file_id"])

# Or poll + wait in one call
result = mql.video.query_and_wait(video["task_id"])
download = mql.video.query_and_download(video["task_id"])

Response

200
{
  "task_id": "task_video_abc123",
  "base_resp": {
    "status_code": 0,
    "status_msg": "success"
  }
}