English
  • 中文
  • English
English
  • 中文
  • English
官网
服务状态
English
  • 中文
  • English
  1. Videos
  • Quickstart & Conventions
  • Images
    • GPT Image 2 / 2.5 / 2.6 Generation & Editing
    • Nano Banana Image Generation
    • Gemini Native Sync Image Generation
    • Seedream 5.0 Pro / 5.5 Image Generation
    • Midjourney Image Generation
  • Videos
    • Seedance 2 Video Generation
    • Omni Video Generation
    • Seedance 2.5 Video Generation
    • MiniMax H3 Video Generation
    • WAN 3.0 Video Generation
    • Muse Video Generation
    • Seedance Asset Registration
    • Gemini Omni 1.2 Flash Video Generation
    • Seedance Volcengine Native Video Generation
    • MAGI-2 Video Generation
  • Text Models
    • Claude Desktop (CC Switch) Setup Guide
    • Codex in ChatGPT Desktop Setup Guide
    • Gemini Text Models (Native Format)
    • Text & Chat APIs (OpenAI / Claude)
  • Audio
    • Gemini Text-to-Speech (TTS)
  1. Videos

MiniMax H3 Video Generation

MiniMax H3 generates videos with the minimax-h3 model, supporting text-to-video, first-frame, last-frame, first-and-last-frame, and image, video, and audio references. All outputs render at 768P for 1–15 seconds and are billed per output second.
The API uses an asynchronous task workflow: Create task → Poll task → Retrieve video.

Quickstart#

1. Create a Task#

The following request generates a 4-second, 768P, 16:9 video:
The id field in the response is your video task ID:
{
  "id": "task_xxxxxxxxxxxxxxxxxxxxxxxx",
  "object": "video",
  "model": "minimax-h3",
  "status": "queued",
  "progress": 0
}

2. Poll the Task#

3. Retrieve the Video#

Once the task completes, read metadata.url or download via the content endpoint as described in "Retrieving Results" below.

Create Video Task#

Request Parameters#

ParameterTypeRequiredDescription
promptstringYesDescribes the scene, subjects, motion, camera work, and visual style. When using reference assets, cite them with tags such as <Picture 1> (see below).
modelstringYesSet to minimax-h3.
durationintegerYesVideo duration in integer seconds (1–15).
resolutionstringYesMust be 768P.
ratiostringYesAspect ratio; see allowed values below.
refobject[]NoFirst/last frames or reference assets; see rules below.
prompt_optimizerbooleanNoWhen true, rewrites the prompt into H3's recommended format before generation. Defaults to false (no rewriting).
Only the parameters listed above are accepted; passing any unlisted field returns 400.

Aspect Ratios#

ratioOutput Dimensions
21:91536×672
16:91344×768
4:31024×768
1:1768×768
3:4768×1024
9:16768×1344
adaptiveAutomatically determined from the input asset's aspect ratio; available only when passing a first frame, last frame, reference image, or reference video
Unlike other video models, ratio is required in every scenario. When passing only reference audio (without any image or video), you must specify a fixed aspect ratio rather than adaptive.

Generation Modes#

Scenariodurationref
Text-to-video1–15Omit or pass an empty array
First / last / first-and-last frame1–151 first frame, 1 last frame, or first frame followed by last frame
Multimodal reference1–15Reference images, videos, and audio clips used individually or in combination
Passing a resolution other than 768P or a duration outside 1–15 immediately returns a 400 parameter error.

First/Last Frames & Reference Assets#

Pass all media assets in the ref array.

ref Format#

{
  "url": "https://example.com/reference.jpg",
  "type": "image",
  "role": "reference_image"
}
FieldTypeRequiredDescription
urlstringYesPublicly accessible HTTPS media file URL. Base64 and data URIs are not supported.
typestringYesAsset type: image, video, or audio.
rolestringBy scenarioAllowed values are listed below; when omitted for general reference assets, inferred from type.

Asset Roles#

typerolePurpose
imagefirst_frameVideo opening frame; place as the first item in ref when paired with a last frame.
imagelast_frameVideo closing frame; can be used alone or paired with first_frame (place as the second item).
imagereference_imageReference for character, scene, object, or style.
videoreference_videoReference for motion, camera work, or pacing.
audioreference_audioReference for voice, timbre, rhythm, or ambience.
When role is omitted, image, video, and audio default to reference_image, reference_video, and reference_audio, respectively—they are never inferred as first_frame or last_frame. Always pass role explicitly when using first or last frames.
First/last frames cannot be mixed with multimodal references: first_frame and last_frame cannot appear in the same request as any reference_* asset. When using both a first frame and a last frame, their aspect ratios must differ by no more than 2%.

Referencing Assets in Prompts#

In multimodal reference mode, assets of the same modality are numbered starting from 1 according to their order in ref (images, videos, and audio clips maintain separate counters). Reference them in your prompt with literal tags such as <Picture 1>, <Video 1>, and <Audio 1>, specifying what each asset controls (face, clothing, scene, motion, timbre, etc.):
The woman in <Picture 1> walks into the shop in <Picture 2> following the motion in <Video 1>, with voice timbre matching <Audio 1>.
Reordering ref changes these numbers. Shorthand forms such as 图1 or @图片 (literal Chinese tags used by other models) are not recognized as asset references.

Count & File Requirements#

AssetPer-Request LimitFile Requirements
First / last frame1 first frame, 1 last frame, or first + last frameStatic JPG/JPEG, PNG, WebP, HEIC, or HEIF; max 30 MB per image
Reference imagesUp to 9 imagesSame as above
Reference videosUp to 3 clipsMP4 or MOV (H.264 or H.265, optional AAC/MP3 audio track); max 50 MB per clip
Reference audioUp to 3 clipsWAV, MP3, or M4A/AAC; max 15 MB per clip
Total reference assetsUp to 12 items combinedEach item must satisfy the limits for its modality
Images: 256–5760 pixels per side, max 33,177,600 total pixels, aspect ratio 0.4–2.5; animated images are not allowed.
Reference videos and reference audio: minimum 2 seconds per clip; clips longer than 15 seconds are trimmed to the first 15 seconds.
Total reference video duration must not exceed 15 seconds, and total reference audio duration must not exceed 15 seconds (counted after trimming); audio tracks embedded in reference videos do not count toward audio duration.
Tasks with invalid media durations transition to failed.

First-Frame Example#

{
  "prompt": "Keep the character and outfit from the first frame consistent as the subject turns and walks toward the camera while the camera pulls back smoothly",
  "model": "minimax-h3",
  "duration": 4,
  "resolution": "768P",
  "ratio": "adaptive",
  "ref": [
    { "url": "https://example.com/first-frame.jpg", "type": "image", "role": "first_frame" }
  ]
}

First-and-Last-Frame Example#

{
  "prompt": "Smooth transition from an indoor daytime scene to an urban nightscape with continuous subject motion and a natural camera push-in",
  "model": "minimax-h3",
  "duration": 6,
  "resolution": "768P",
  "ratio": "16:9",
  "ref": [
    { "url": "https://example.com/first-frame.jpg", "type": "image", "role": "first_frame" },
    { "url": "https://example.com/last-frame.jpg", "type": "image", "role": "last_frame" }
  ]
}
For last-frame-only generation, omit the first_frame item from the example above.

Multimodal Reference Example#

{
  "prompt": "The character in <Picture 1> walks following the motion in <Video 1>, with voice timbre matching <Audio 1>, cinematic short film",
  "model": "minimax-h3",
  "duration": 8,
  "resolution": "768P",
  "ratio": "adaptive",
  "prompt_optimizer": true,
  "ref": [
    { "url": "https://example.com/character.jpg", "type": "image", "role": "reference_image" },
    { "url": "https://example.com/motion.mp4", "type": "video", "role": "reference_video" },
    { "url": "https://example.com/voice.mp3", "type": "audio", "role": "reference_audio" }
  ]
}

Retrieving Results#

Call GET /v1/videos/{task_id} with the task ID to fetch its latest status.

Task Statuses#

StatusDescription
queuedAccepted; downloading assets, running moderation, or waiting in queue.
in_progressVideo generation is in progress.
completedVideo has been generated.
failedTask has ended; read error for details.

Generation Time#

Tasks typically finish in 5–15 minutes; tasks with reference videos are noticeably slower and may take 30 minutes or more. Poll every 10–30 seconds and configure an overall client timeout of at least 60 minutes. Treat any status value not listed above as incomplete and continue polling. Consider the video ready only when status is completed and metadata.url is non-empty (result_url holds the same value as a fallback).

Completed Response#

{
  "id": "task_xxxxxxxxxxxxxxxxxxxxxxxx",
  "status": "completed",
  "progress": 100,
  "metadata": {
    "url": "https://example.com/result.mp4"
  }
}

Downloading the Video#

Fetch the video directly from metadata.url, or download it via the content endpoint:
Output files are MP4 (H.264, 24 FPS, with AAC audio). Because generation aligns to a 24-frame grid, the actual duration is slightly longer than the requested seconds (for example, 4 seconds yields roughly 4.46 seconds); billing always follows the requested duration. Result URLs expire—download and save the video promptly upon completion.

Billing#

Billed by the requested duration in seconds, with no extra fee for the number of reference assets. Failed tasks (including asset download failures and content moderation rejections) receive a full refund.

Error Handling#

Clients should check the HTTP status code, task status, and error.message together.
HTTP StatusCommon Cause
400Invalid parameters (e.g., resolution other than 768P, duration outside 1–15, or unsupported fields); querying a non-existent task also returns 400 with code set to task_not_exist
401Missing or invalid API key
403Insufficient balance/quota, or no permission for the requested model
429Rate limit exceeded
503Service temporarily unavailable
500 / 502Transient service error
If asset download, format validation, content moderation, or generation fails after task creation, the task enters failed and reports the cause in error.message:
CauseRecommended Action
Asset download failed or URL unreachableConfirm the URL is publicly accessible and has not expired
Unsupported format or dimensionsAdjust assets per "Count & File Requirements"
Invalid reference video or audio durationEach clip must be at least 2 seconds, and combined duration per modality must not exceed 15 seconds
First/last frame aspect ratio mismatchEnsure the two images differ in aspect ratio by no more than 2%
Content moderation rejectedModify the prompt or input assets and resubmit
Service busyResubmit later
Modified at 2026-12-04 07:58:01
Previous
Seedance 2.5 Video Generation
Next
WAN 3.0 Video Generation
Built with