API DocsAI Model APIsVideosMiniMax-H3

Multimodal Video Generation

Generate videos with MiniMax-H3 multimodal content arrays (text / image / video / audio). Supports text-to-video, image-to-video (first/last frame), and multimodal reference-to-video with 2K output. Async task API: submit to receive task_id, then poll for status.

Use the MiniMax-H3 multimodal video API to combine text prompts, first/last-frame images, reference images, reference videos, and reference audio in a single request. It supports text-to-video, image-to-video (first frame / last frame / first and last frames), and multimodal reference-to-video generation at 768P / 2K resolution and 4–15 seconds in duration.

This is an asynchronous task API: submitting a request immediately returns a task_id. Poll the task status, then download the video after it succeeds.

Only the MiniMax-H3 model is supported.

Base URL

  • https://api.autorouter.top — Production

Authentication

BearerAuth: http (bearer) Authenticate using a Bearer Token. Format: Authorization: Bearer sk-xxxxxx

Endpoints

POST /minimax/v2/video_generation

Create a video generation task

Create a video generation task through a multimodal content array (text / image / video / audio). This is an asynchronous API. On successful creation, it returns a task_id. Poll the task status through the Query Task API, then retrieve the generated video after the task succeeds.

Headers

NameTypeRequiredDefaultDescription
Content-TypestringYesapplication/jsonThe media type of the request body. Set this to application/json
AuthorizationstringYes-Authentication information, in the format: Bearer sk-xxxxxx

Request Body

Content-Type: application/json

Example:

{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
    }
  ],
  "resolution": "2K",
  "duration": 5,
  "ratio": "16:9"
}

Properties:

NameTypeRequiredDefaultEnumDescription
modelstringYes-MiniMax-H3Model name
contentarrayYes--Multimodal input content array describing the information used to generate the video
content[].typestringYes-text, image_url, video_url, audio_urlType of input content
resolutionstringYes-768P, 2KVideo resolution
durationintegerYes-415Generated video duration (seconds)
ratiostringNoadaptiveadaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16Aspect ratio of the generated video; see below
callback_urlstringNo--Callback URL for task status change notifications
aigc_watermarkbooleanNofalse-Whether to add an AIGC watermark to the generated video

modelstring(required)

Model name. Currently available value: MiniMax-H3.

contentarray(required)

Multimodal input content array describing the information used to generate the video. Each item is distinguished by type (text / image_url / video_url / audio_url) and can be labeled with role to indicate its purpose.

Every request must include one non-empty text item (prompt required); omitting it returns a parameter error.

Supported input combinations (for different generation scenarios):

  • Text-to-video: one text item only.
  • Image-to-video—first frame: text + 1 image_url (role=first_frame or omitted).
  • Image-to-video—last frame: text + 1 image_url (role=last_frame).
  • Image-to-video—first and last frames: text + 2 image_url items (role values first_frame and last_frame, respectively).
  • Multimodal reference-to-video: text + a combination of reference images (role=reference_image), reference videos (role=reference_video), and reference audio (role=reference_audio).

Image-to-video and multimodal reference-to-video are mutually exclusive: if content includes any of the reference_image / reference_video / reference_audio roles, it cannot include first_frame / last_frame (and vice versa). The two cannot be mixed.

Input media limits (total request body size ≤ 64 MB; use public URLs for large files instead of Base64)

Images (image_url):

ItemLimit
FormatsJPG, JPEG, PNG, WEBP, HEIC, HEIF
Per-file size≤ 30 MB
Width and height range[256, 5760] px
Aspect ratio (width/height)[0.4, 2.5]
QuantityFirst frame ≤ 1, last frame ≤ 1, reference images ≤ 9

Videos (video_url) (multimodal reference scenarios only):

ItemLimit
Container / formatsMP4 (.mp4), MOV (.mov)
EncodingVideo H.264/AVC, H.265/HEVC; audio AAC, MP3
Per-file size≤ 50 MB
Quantity≤ 3
Per-clip duration[2, 15] s; total duration ≤ 15 s
Width and height range[256, 5760] px
Aspect ratio (width/height)[0.4, 2.5]
Frame rate[23.976, 60]

Audio (audio_url) (multimodal reference scenarios only):

ItemLimit
FormatsWAV, MP3
Per-file size≤ 15 MB
Quantity≤ 3
Per-clip duration[2, 15] s; total duration ≤ 15 s

The format is as follows:

[
  {
    "type": "text",
    "text": "string"
  },
  {
    "type": "image_url",
    "image_url": {
      "url": "string"
    },
    "role": "first_frame"
  },
  {
    "type": "video_url",
    "video_url": {
      "url": "string"
    },
    "role": "reference_video"
  },
  {
    "type": "audio_url",
    "audio_url": {
      "url": "string"
    },
    "role": "reference_audio"
  }
]

typestring(required)

Type of input content:

  • text: Text prompt
  • image_url: Image
  • video_url: Video (multimodal reference scenarios only)
  • audio_url: Audio (multimodal reference scenarios only)
type=textobject(required)
{
  "type": "text",
  "text": "string"
}
  • text: Text prompt (prompt), required: all scenarios must include one non-empty text item describing the expected generated video
  • Length is measured by character count; each text can contain up to 7,000 characters
type=image_urlobject(optional)
{
  "type": "image_url",
  "image_url": {
    "url": "string"
  },
  "role": "first_frame"
}
  • image_url.url: Image URL (required). Supported:
    • Public URL
    • mm_file://{file_id} (references an existing platform file, such as an uploaded file or the file_id of a historical output)
    • data:image/<format>;base64,<Base64> data URI (<format> must be lowercase)
  • role: Purpose of the content; see the role description below
  • See the content description above for format / size / dimension / quantity limits
type=video_urlobject(optional)
{
  "type": "video_url",
  "video_url": {
    "url": "string"
  },
  "role": "reference_video"
}
  • video_url.url: Video URL (required). Supported:
    • Public URL
    • mm_file://{file_id}
    • data:video/mp4;base64,<Base64> data URI
  • Note that total request body size must be ≤ 64 MB. Base64 increases size by approximately 33%, so use a public URL or mm_file:// for large videos.
  • Used only for multimodal reference scenarios; see the content description above for format / size / duration limits
type=audio_urlobject(optional)
{
  "type": "audio_url",
  "audio_url": {
    "url": "string"
  },
  "role": "reference_audio"
}
  • audio_url.url: Audio URL (required). Supported:
    • Public URL
    • mm_file://{file_id}
    • data:audio/<format>;base64,<Base64> data URI (<format> must be lowercase)
  • Used only for multimodal reference scenarios; see the content description above for format / size / duration limits
rolestring(conditionally required)

Position or purpose of the content:

  • first_frame: First-frame image (image-to-video; if only one image is provided and role is omitted, it is treated as first_frame by default)
  • last_frame: Last-frame image (image-to-video with first and last frames; must be paired with first_frame)
  • reference_image: Reference image (multimodal reference-to-video)
  • reference_video: Reference video (multimodal reference-to-video)
  • reference_audio: Reference audio (multimodal reference-to-video)

resolutionstring(required)

Video resolution. Currently available values: 768P, 2K.

durationinteger(required)

Generated video duration (seconds), required and must be an integer.

Available values: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

ratiostring(optional)

Aspect ratio of the generated video. Defaults to adaptive (automatically selects the most appropriate aspect ratio based on the input; the actual ratio is available from the ratio field in the query API).

Available values: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.

Text-to-video (t2va, content contains only text): ratio is required and cannot be adaptive; available values are 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.

Image-to-video (i2va, content contains first_frame / last_frame images): the aspect ratio is determined by the input image, and ratio is always adaptive; passing another valid value does not return an error, but it is ignored and processed as adaptive.

Multimodal reference-to-video (r2va, content contains reference_image / reference_video / reference_audio): ratio is optional and defaults to adaptive; any specific ratio listed above can also be explicitly set.

callback_urlstring(optional)

Callback URL for task status change notifications. Once configured, the server first sends a verification request containing a challenge field (return the challenge unchanged within 3 seconds to complete verification). After verification succeeds, it sends a POST push notification to this URL whenever task status changes. The push body has the same structure as the response from the Query Task API.

Callback status values: queued (queued), running (running), succeeded (succeeded), failed (failed), cancelled (cancelled).

aigc_watermarkboolean(optional)

Whether to add an AIGC watermark to the generated video. Defaults to false.

Responses

200: Task created successfully; returns task_id

Content-Type: application/json

400: Invalid parameters

401: Authentication failed

402: Insufficient balance/quota

422: Input contains sensitive content

429: Rate limit triggered

500: Server error

Request Examples

curl -X POST "https://api.autorouter.top/minimax/v2/video_generation" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
    }
  ],
  "resolution": "2K",
  "duration": 5,
  "ratio": "16:9"
}'

Response Examples

{
  "task_id": "424010985738629"
}

Response field descriptions:

NameTypeDescription
task_idstringTask ID used to subsequently query task status and results

More Scenario Examples

Text-to-video (t2va)

curl -X POST "https://api.autorouter.top/minimax/v2/video_generation" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "史诗级太空歌剧院线预告:女舰长独自站在巨大观景窗前,最后一支舰队正在集结并跃迁离去,强光爆闪、舰桥震动,她被留在原地。"
    }
  ],
  "resolution": "2K",
  "duration": 5,
  "ratio": "16:9"
}'

Image-to-video (i2va)

curl -X POST "https://api.autorouter.top/minimax/v2/video_generation" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "Pull focus to the people in the background and add more steam to the ramen bowl."
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/first-frame.png"
      },
      "role": "first_frame"
    }
  ],
  "resolution": "2K",
  "duration": 5,
  "ratio": "adaptive"
}'

Multimodal reference-to-video (r2va)

curl -X POST "https://api.autorouter.top/minimax/v2/video_generation" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "MiniMax-H3",
  "content": [
    {
      "type": "text",
      "text": "角色说话:Follow the wind, live free.Leave worries behind, enjoy the moment,音色参考音频1"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/reference.mp4"
      },
      "role": "reference_video"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/reference.mp3"
      },
      "role": "reference_audio"
    }
  ],
  "resolution": "2K",
  "duration": 5,
  "ratio": "adaptive"
}'

GET /minimax/v2/query/video_generation/{task_id}

Query a task

Query the status and results of a single video generation task from the past 7 days by task_id. After the task succeeds (status=succeeded), retrieve the generated video from content.url.

  • Only task records from the past 7 days can be queried (window [T-7 days, T), where T is the UTC timestamp in seconds when the request is initiated); a task_id outside this window returns invalid task_id
  • Video output download links expire; download or save them promptly

Path Parameters

NameTypeRequiredDescription
task_idstringYesTask ID to query (the task_id returned when creating the task)

Headers

NameTypeRequiredDescription
AuthorizationstringYesAuthentication information, in the format: Bearer sk-xxxxxx

Responses

200: Task queried successfully

Content-Type: application/json

400: Invalid parameters

401: Authentication failed

429: Rate limit triggered

500: Server error

Request Examples

curl -X GET "https://api.autorouter.top/minimax/v2/query/video_generation/{task_id}" \
  -H "Authorization: Bearer sk-xxxxxx"

Response Examples

{
  "task": {
    "id": "424010985738629",
    "model": "MiniMax-H3",
    "status": "succeeded",
    "created_at": 1785125529,
    "updated_at": 1785125946,
    "content": {
      "url": "https://your-cdn.example.com/h3-generated-2k-output.mp4"
    },
    "resolution": "2K",
    "duration": 5,
    "usage": {
      "total_seconds": 5,
      "input_seconds": 0,
      "output_seconds": 5,
      "input_image_count": 0
    },
    "ratio": "16:9",
    "task_type": "generation",
    "modality": "video"
  }
}

Response field descriptions:

NameTypeDescription
taskobjectTask object
task.idstringTask ID
task.modelstringModel name used by the task, such as MiniMax-H3
task.statusstringTask status; see below
task.errorobjectError information. Not returned when the task succeeds; returns code and message when the task fails
task.created_atintegerUnix timestamp (seconds) when the task was created
task.updated_atintegerUnix timestamp (seconds) when the task status was updated
task.contentobjectTask output content, returned after the task succeeds
task.content.urlstringExpiring download URL for the video output; download or save it promptly. Query again after expiry to obtain a new URL
task.resolutionstringResolution of the task output
task.durationintegerDuration of the task output (seconds)
task.usageobjectBillable usage for this request
task.ratiostringAspect ratio of the task output; may return an empty string when not applicable to the current task type
task.task_typestringTask type: generation (video generation)
task.modalitystringOutput modality: video generation tasks return video

statusstring

Task status:

  • queued: Queued
  • running: Running
  • succeeded: Succeeded
  • failed: Failed
  • cancelled: Cancelled

The recommended polling interval is 3–5 seconds, until status is succeeded, failed, or cancelled.

errorobject

Error information. Not returned when the task succeeds; returned when the task fails.

codestring

Error code.

messagestring

Error message.

contentobject

Task output content, returned after the task succeeds.

urlstring

Expiring download URL for the video output; download or save it promptly. Query again after expiry to obtain a new URL.

usageobject

Billable usage for this request. Video tasks return fields measured in seconds.

total_secondsinteger

Total billable seconds for this request = input seconds + output seconds.

input_secondsinteger

Billable seconds for input reference videos (counted when reference videos are included).

output_secondsinteger

Billable seconds for the output video.

input_image_countinteger

Number of images involved in billing for this request.

Error Handling

HTTP 400 Invalid Parameters

ScenarioRecommended action
No non-empty text providedAdd the required prompt
Image-to-video and multimodal reference roles are mixed in contentThe two cannot be mixed; select only one based on the scenario
No ratio provided for text-to-video, or adaptive is providedText-to-video must explicitly specify a concrete aspect ratio
Invalid duration / resolutionUse the enum values listed in the documentation
Media format / size / dimensions exceed limitsAdjust input according to the content media limits

HTTP 401 / 403 Authentication Errors

  • 401 Unauthorized: The API Key is invalid or expired
  • 403 Forbidden: The API Key is not authorized to access this model

HTTP 402 Insufficient Balance

An insufficient balance error is returned. Go to the AutoRouter console to add funds.

HTTP 422 Sensitive Content

The input contains sensitive content. Adjust the prompt or media assets and try again.

Task failed Status

CauseRecommended action
Content moderation failedAdjust the prompt to avoid sensitive content
Invalid parameter combinationPass parameters according to the Request Body specification

When a task fails, AutoRouter automatically refunds your account.

On this page