MiniMax H3 Video Generation API Integration Guide

This article introduces the integration and use of the MiniMax H3 Video Generation API. The API supports text-to-video, first- and last-frame control, and multimodal reference-to-video generation, using a unified V2 multimodal content structure to create tasks.

Application Process

To use the MiniMax H3 Video Generation API, first obtain your API Token from the Ace Data Cloud Console and keep it for later use.

If you have not yet logged in or registered, you will be automatically redirected to the login page to register and log in. Once completed, you will be automatically returned to the current page.

A general application's API Key can be used for services enabled for the account; a dedicated application's Key can be used within that application's service scope. Please check the Key's permissions, validity period, and limits, and confirm that the application balance is sufficient to pay for this request. Available trial credits are subject to what is shown in your account; if the balance is insufficient, click the "Recharge" button.

📘 Full documentation: MiniMax H3 Video Generation API →

We recommend saving the Token as an environment variable rather than writing it into source code or committing it to a repository:

export ACEDATACLOUD_API_KEY="YOUR_API_KEY"

API Overview

  • Base URL: https://api.acedata.cloud
  • Endpoint: POST /minimax/videos
  • Authentication: Include authorization: Bearer {token} in the HTTP Header
  • Request headers:
    • accept: application/json
    • content-type: application/json
  • Model (model): MiniMax-H3
  • Input structure: Pass text, images, video, and audio through the unified content field
  • Output mode: By default, waits synchronously for generation to complete and returns the full task; returns task_id and trace_id immediately when async: true or callback_url is provided
  • Result query: Use the MiniMax H3 Task Query API to obtain the status and finished video
  • Asynchronous callback: Optional; receive the final task result through callback_url

You do not need to pass action to select the generation mode. The API automatically determines the intended use based on the media types and role in content.

Suitable Scenarios

Scenario Input combination Common uses
Text-to-video Text Advertising concepts, storyboard previews, short videos, atmospheric shots
First-frame image-to-video Text + first-frame image Bring product images, posters, portraits, or illustrations naturally to life
Last-frame / first-and-last-frame video Text + last frame, or text + first frame + last frame Control openings and endings, transitions, growth and changes, and before-and-after comparisons
Multimodal reference-to-video Text + reference image / video / audio Maintain character and product consistency; replicate movements, camera movements, voice timbre, or editing rhythm

Calling Process

By default, when async is not provided, /minimax/videos waits for generation to complete and directly returns the full task. When you need to release the connection immediately, pass async: true or callback_url:

  1. Save the task_id and trace_id from the immediate response.
  2. If no callback is configured, call /minimax/tasks approximately every 10 seconds to query the task.
  3. When task.status changes to succeeded, obtain the video from task.content.url.
  4. When the status is failed or cancelled, stop polling and read task.error.

Top-Level Request Parameters

Parameter Type Required Default Description
model string Yes - Fixed as MiniMax-H3
content object[] Yes - Multimodal content array; must contain one non-empty text item
resolution string Yes - 768P or 2K
duration integer Yes - Generation duration, an integer from 4 to 15 seconds
ratio string Conditionally required adaptive adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16
async boolean No false When true, returns the task identifier immediately; obtain the result through the task API
callback_url string No - Publicly accessible callback URL for receiving the final task result; automatically enables asynchronous mode when provided

The rules for ratio depend on the workflow:

  • Text-to-video: Required and cannot be adaptive.
  • First-frame, last-frame, or first-and-last-frame video: The aspect ratio is determined by the input images; we recommend omitting it or passing adaptive.
  • Multimodal reference-to-video: Can be omitted, defaulting to adaptive; a fixed aspect ratio can also be explicitly specified.

The API does not accept legacy or compatibility fields, such as prompt, image_urls, audio_urls, messages, and first_frame_image. When you receive an error for such parameters, remove the legacy fields and migrate to content; for example, change "prompt": "A cat waves" to "content": [{"type": "text", "text": "A cat waves"}]. Do not send both the new and old formats at the same time.

content Item Parameters

Each content item must have a type; the remaining fields depend on the type:

type Data field role Description
text text Do not pass Each request must contain one non-empty text item, with a maximum of 7,000 characters
image_url image_url.url first_frame First-frame image; when there is only one image and role is omitted, it is also treated as the first frame
image_url image_url.url last_frame Last-frame image; can be used alone or combined with first_frame to control the start and end points
image_url image_url.url reference_image Reference a subject, character, product, clothing, scene, or style
video_url video_url.url reference_video Reference movement, camera movement, performance, or editing structure
audio_url audio_url.url reference_audio Reference voice timbre, dialogue, music, or rhythm

Media addresses support three forms:

  • A publicly accessible HTTPS URL, recommended for large files.
  • mm_file://{file_id}, referencing a file that has already been uploaded or is available from an existing result.
  • A Base64 data URI for the corresponding media type. Base64 increases the size by approximately one-third; please ensure that the entire request body does not exceed 64 MB.

Media Specifications and Quantity Limits

Media Format Per-file limit Dimensions / Duration Quantity limit
Images JPG, JPEG, PNG, WEBP, HEIC, HEIF Up to 30 MB Width and height each 256–5760 px; aspect ratio 0.4–2.5 Up to 1 first frame, 1 last frame, and 9 reference images
Videos MP4, MOV; H.264/AVC or H.265/HEVC; AAC or MP3 audio Up to 50 MB 2–15 seconds per clip, up to 15 seconds total; width and height each 256–5760 px; aspect ratio 0.4–2.5; 23.976–60 fps Up to 3 reference videos
Audio WAV, MP3 Up to 15 MB 2–15 seconds per clip, up to 15 seconds total Up to 3 reference audio clips

In multimodal reference scenarios, images, videos, and audio are limited to 12 files in total. First-and-last-frame scenarios and reference media scenarios are mutually exclusive: once reference_image, reference_video, or reference_audio is used, first_frame or last_frame cannot be used, and vice versa.

Production-Grade Capabilities Showcase

The following are not concept images or placeholder assets, but actual reference inputs and video outputs from official MiniMax H3 production-grade sample videos. The three examples cover brand films, live-action storytelling, and fashion e-commerce, making them suitable for evaluating the model's most critical capabilities in commercial production.

Capability Key points to observe
Character and facial consistency Whether facial features, hairstyles, makeup, and character presence remain consistent across shot changes
Facial performance Eye movements, micro-expressions, emotional tension, and natural head movements in close-ups
Product structure preservation The contours, materials, how products such as glasses and handbags are worn or carried, and reflections
Brand visual execution Whether the scene atmosphere, film grain, colors, logo, and editing rhythm are consistent
Cinematic storytelling Whether changes in shot size, character blocking, camera movement, pacing, and sound form a complete sequence

“Facial capabilities” here refers to character appearance consistency, facial detail, and performance control in video generation, not identity recognition, face comparison, or face-swapping interfaces.

Luxury Brand Film: Unifying Characters, Products, and Brand Assets

Production objective: A 16:9 haute couture brand film. Establish a cool, austere atmosphere with a desert highway and a vintage car, maintain the female lead's appearance and the black handbag's structure, and naturally incorporate the brand logo into the ending. This example focuses on testing cross-shot character consistency, product preservation, cinematic quality, and the ability to bring the brand story to a close.

Atmosphere and scene reference Character reference
Brand film atmosphere reference featuring a desert highway and vintage car Brand film female lead reference
Handbag product reference Brand logo reference
Black handbag product reference Brand logo reference

Open or download the brand film directly

Corresponding content structure:

{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "15 秒、16:9 高级时装品牌片。荒漠公路旁停着复古汽车,女主从后备箱取出黑色手袋,与男主短暂对视后独自离开。保持人物、手袋与品牌视觉一致;冷峻高级,电影颗粒,剪辑利落,结尾自然呈现品牌 Logo。"
    },
    {
      "type": "image_url",
      "image_url": { "url": "https://cdn.acedata.cloud/uploads/6e65f865-f1c2-4f80-8b51-9a98d4d930b1" },
      "role": "reference_image"
    },
    {
      "type": "image_url",
      "image_url": { "url": "https://cdn.acedata.cloud/uploads/88d89cc3-e6cb-42b4-ab4c-1bbbf6c9f7c8" },
      "role": "reference_image"
    },
    {
      "type": "image_url",
      "image_url": { "url": "https://cdn.acedata.cloud/uploads/e91f7fff-f8e3-4da5-b882-87edbc3c9473" },
      "role": "reference_image"
    },
    {
      "type": "image_url",
      "image_url": { "url": "https://cdn.acedata.cloud/uploads/b68dac43-fb14-42b5-bf8b-fd4d65506520" },
      "role": "reference_image"
    }
  ],
  "resolution": "2K",
  "duration": 15,
  "ratio": "16:9"
}

Live-Action Vertical Short Drama: Facial Consistency and Emotional Performance

Production objective: A 15-second, 9:16 dark romance short-drama trailer. Use reference images of the male and female leads to lock in their appearances, and a castle reference image to constrain the setting; use medium close-ups and facial close-ups to convey confrontational gazes, fear, restraint, and a sense of danger. This example is suitable for observing the consistency of live-action facial features, microexpressions, eyelines, and continuous performance.

Male and female lead references Castle setting reference
Live-action short-drama male and female lead references Dark castle setting reference

Open or download the live-action short drama directly

The prompt should clearly specify the characters' relationship, emotions, and shot sizes, rather than merely describing “a conversation between a man and a woman”:

15 秒、9:16 真人暗黑浪漫短剧预告。女主误入禁忌古堡,唤醒沉睡的吸血鬼贵族;
他危险而克制地靠近,她恐惧但不屈服。保持两位角色的五官、发型与服装一致,
以中近景和面部特写表现眼神对峙与情绪张力,暗色电影光线,节奏紧凑。

Fashion Eyewear Advertisement: Preserving Facial Details and Product Structure

Production objective: A 9:16 high-end fashion eyewear advertisement. The full-body image establishes the model's physique and runway walk, the face reference image establishes facial features and makeup, and the product image establishes the wraparound curves, lens reflections, temples, and cat-eye silhouette. This example tests facial close-ups, consistency across multiple people, how the eyewear is worn, and the product's geometric structure.

Model and styling reference Facial detail reference Eyewear product reference
Fashion advertisement model and styling reference Model facial detail reference Eyewear product structure reference

Open or download the fashion eyewear advertisement directly

In a product advertisement, the prompt should clearly describe the separate roles of the character and product references: character materials constrain the face, makeup, physique, and presence; product materials constrain the silhouette, materials, reflections, and position when worn. This is more reliable than generally writing “generate an eyewear advertisement.”

Text-to-Video

When there is only one text item, it is text-to-video. It is suitable for generating visuals directly from an idea, script, or shot description. Prompts can be organized in the order of “subject + action + scene + camera + lighting + sound.”

curl -X POST 'https://api.acedata.cloud/minimax/videos' \
  -H "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "MiniMax-H3",
    "content": [
      {
        "type": "text",
        "text": "15 秒电影级香水广告:清晨海岸的黑色礁石上,透明香水瓶被薄雾与海浪环绕。微距展现瓶身水珠和玻璃折射,镜头从产品特写缓慢拉升到广阔海面;银蓝色调,真实自然光,高级克制,结尾定格产品。"
      }
    ],
    "resolution": "2K",
    "duration": 15,
    "ratio": "16:9"
  }'

The default synchronous mode returns the complete task after generation is finished:

{
  "task": {
    "id": "f5977217-ed2c-40da-adbe-93d08235618f",
    "model": "MiniMax-H3",
    "status": "succeeded",
    "content": { "url": "https://cdn.acedata.cloud/minimax/f5977217.mp4" },
    "resolution": "2K",
    "duration": 15,
    "ratio": "16:9"
  }
}

If "async": true is added to the request, the API returns immediately:

{
  "task_id": "f5977217-ed2c-40da-adbe-93d08235618f",
  "trace_id": "trace_7f8c2b1a"
}

First-Frame Image-to-Video

Mark an image as first_frame, and the model will begin generating from that image. It is suitable for naturally bringing posters, product images, character designs, and photographs to life.

{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "人物自然呼吸并看向窗外,衣角被微风吹动,镜头缓慢推进"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://cdn.acedata.cloud/b1c82e4937.png"
      },
      "role": "first_frame"
    }
  ],
  "resolution": "2K",
  "duration": 5,
  "ratio": "adaptive"
}

Last-Frame and First-and-Last-Frame Video

Providing only last_frame allows the model to naturally generate a video ending at the specified frame; providing both first_frame and last_frame allows explicit control over the starting and ending points. This is suitable for transitions, transformations, growth processes, or before-and-after product comparisons.

{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "女孩从童年自然成长为青年,时间流逝平滑,人物始终位于画面中央"
    },
    {
      "type": "image_url",
      "image_url": { "url": "YOUR_FIRST_FRAME_URL" },
      "role": "first_frame"
    },
    {
      "type": "image_url",
      "image_url": { "url": "YOUR_LAST_FRAME_URL" },
      "role": "last_frame"
    }
  ],
  "resolution": "2K",
  "duration": 5,
  "ratio": "adaptive"
}

The first and last frames should have dimensions and aspect ratios that match as closely as possible, and differences in subject position, composition, and lighting should not be too large, making it easier to achieve a natural transition.

Multimodal Reference-to-Video Generation

Reference materials can be combined: reference images control the appearance of characters or products, reference videos control actions and camera movement, and reference audio controls dialogue voice characteristics, music, or editing rhythm. The prompt should clearly specify what each type of material should control, avoiding uploading materials without specifying how they relate.

{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "保持参考人物的五官、发型与服装一致,按照参考视频中的表演动作完成时尚短片;镜头节奏跟随参考音频,近景突出自然面部表情"
    },
    {
      "type": "image_url",
      "image_url": { "url": "YOUR_CHARACTER_IMAGE_URL" },
      "role": "reference_image"
    },
    {
      "type": "video_url",
      "video_url": { "url": "YOUR_PERFORMANCE_VIDEO_URL" },
      "role": "reference_video"
    },
    {
      "type": "audio_url",
      "audio_url": { "url": "YOUR_AUDIO_URL" },
      "role": "reference_audio"
    }
  ],
  "resolution": "2K",
  "duration": 5,
  "ratio": "adaptive"
}

Callback Notifications

Providing callback_url automatically enables asynchronous mode: the creation endpoint immediately returns task_id and trace_id, and POSTs the final result to that address after the task completes, with the same structure as the task query response.

The final status in the callback is succeeded, failed, or cancelled. Even when using a callback, it is recommended to save task_id so that you can proactively query the task or recover missed notifications.

Common Errors

HTTP Status Code Meaning Recommended Action
400 Invalid parameters or material combination Check required fields, role, and the number and format of materials
401 Token missing or invalid Check Authorization: Bearer ...
402 Insufficient balance or quota Add to the general balance in the console
422 Content safety check failed Adjust the prompt or materials and resubmit
429 Requests too frequent Retry with exponential backoff; a polling interval of about 10 seconds is recommended
500 Service temporarily unavailable Retain request information and retry later

task.status: succeeded in a synchronous response indicates that the video has been generated; an asynchronous acknowledgment only indicates that the task has entered the queue. Charges apply only when the task ultimately succeeds; querying the task itself is free and does not incur duplicate charges.

H3 Max

MiniMax-H3-Max supports 480P or 768P and integer durations of 5–15 seconds. Audio input incurs no additional charge, the first 2 images are free, and additional images are charged individually; reference video is charged based on actual input duration. This model does not support 2K.