BeeRoute logoBeeRoute.

Home / Docs / MiniMax-H3 Video Generation API Documentation

MiniMax-H3 Video Generation API Documentation

Call the BeeRoute video generation API to generate video content. This document is dedicated to the MiniMax-H3 (Hailuo-03) series of video generation models, supporting text-to-video, image-to-video (first frame / last frame / first and last frames), and multimodal reference-to-video (reference images / reference videos / reference audio), with native 2K output.

Download the MD file of this document

Official Documentation:


1. Supported Models

Model List

Model NameDescriptionUse Cases
MiniMax-H3Hailuo-03, native 2K output, multimodal inputText-to-video, image-to-video, first/last frames, multimodal reference-to-video

MiniMax-H3 Video Generation Pricing

Video Generation — Output Pricing

ModelResolutionBilling RulePrice (USD)
MiniMax-H32KBilled per second$0.0588 / second
MiniMax-H3768PBilled per second$0.0368 / second

Video Generation — Input Material Pricing

ModelMaterial TypeBilling RulePrice (USD)
MiniMax-H3AudioFreeFree
MiniMax-H3ImageFree for up to 5 images; images beyond that are billed per image$0.0074 / image
MiniMax-H3Video (2K)Billed by input video duration and output video resolution$0.0588 / second
MiniMax-H3Video (768P)Billed by input video duration and output video resolution$0.0368 / second

Video Regeneration — Output Pricing

Regenerates an already generated 768P video into a 2K video, billed by the number of output seconds of the regenerated video.

ModelResolutionBilling RulePrice (USD)
MiniMax-H3-Regeneration768P → 2KBilled by the output seconds of the regenerated video$0.0221 / second

Video Regeneration — Input Material Pricing

Input materials used in the original 768P generation task are billed again.

ModelMaterial TypeBilling RulePrice (USD)
MiniMax-H3-RegenerationAudioFreeFree
MiniMax-H3-RegenerationImageFree for up to 5 images; images beyond that are billed per image$0.0037 / image
MiniMax-H3-RegenerationVideoBilled by the seconds of input video in the original 768P generation task$0.0221 / second

Billing Notes:

  • Billed by the actual duration (seconds) of the generated video; the duration parameter directly affects the cost.
  • Different resolutions (768P / 2K) are billed at different multipliers; see the pricing tables above.
  • Actual billing is based on the upstream response after the task completes (any difference is refunded or charged).

2. Generate Video

Since video generation tasks take a relatively long time, the API uses asynchronous calls. The entire process consists of two core steps: "Create task → Poll for result".

API Endpoint

POST /v2/video_generation

Request Headers

ParameterTypeRequiredDescription
AuthorizationstringYesUser authentication token (Bearer sk-xxxx)
Content-TypestringYesapplication/json

Request Parameters

The BeeRoute MiniMax integration uses passthrough mode; the request body fully matches MiniMax's native parameters.

ParameterTypeRequiredDescription
modelstringYesModel name. Currently available value: MiniMax-H3.
contentarray[object]YesArray of multimodal input content describing the information used to generate the video. Each element is distinguished by type and can be labeled with its purpose via role. Every request must include a non-empty text item (the prompt is required). See the ContentItem description below.
resolutionstringYesVideo resolution. Options: 768P, 2K.
durationintegerYesGenerated video duration (seconds), integer. Options: 4 ~ 15. ⚠️ Directly affects cost; billed per second.
ratiostringNoAspect ratio of the generated video. Default adaptive (automatic: the most suitable aspect ratio is selected adaptively based on the input; the actual ratio is available in the ratio field of the query API). Options: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16. See the per-scenario notes below.
callback_urlstringNoCallback URL for task status change notifications. Once configured, the server first sends a verification request containing a challenge field (you must return the challenge unchanged within 3 seconds to complete verification). After successful verification, a POST notification is pushed to this URL every time the task status changes; the payload structure is the same as the response of the query task API.
aigc_watermarkbooleanNoWhether to add an AIGC identification watermark to the generated video. Default false.

ContentItem Description

Each element of the content array has the following structure:

ParameterTypeRequiredDescription
typestringYesType of the input content: text / image_url / video_url / audio_url.
textstringConditionally requiredText prompt, used when type=text. Every scenario must include a non-empty text describing the desired video. A single text can contain at most 7000 characters.
image_urlobjectConditionally requiredImage object used when type=image_url, containing a url field.
video_urlobjectConditionally requiredVideo object used when type=video_url (reference video, multimodal reference scenario only), containing a url field.
audio_urlobjectConditionally requiredAudio object used when type=audio_url (reference audio, multimodal reference scenario only), containing a url field.
rolestringConditionally requiredPosition or purpose of the content; see the per-scenario notes. Options: first_frame, last_frame, reference_image, reference_video, reference_audio.

Supported URL Formats

TypeSupported URL Formats
image_url.urlPublic URL; mm_file://{file_id}; data:image/<format>;base64,<Base64> (<format> in lowercase, e.g. jpeg, png, webp)
video_url.urlPublic URL; mm_file://{file_id}; data:video/mp4;base64,<Base64>
audio_url.urlPublic URL; mm_file://{file_id}; data:audio/<format>;base64,<Base64> (<format> in lowercase, e.g. wav, mp3)

Input Media Limits

Total request body size ≤ 64 MB. For large files, use a public URL instead of Base64.

Image image_url

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

Video video_url (multimodal reference scenario only)

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

Audio audio_url (multimodal reference scenario only)

ItemLimit
FormatWAV, MP3
Single file size≤ 15 MB
Count≤ 3
Single clip duration[2, 15] s; total duration ≤ 15 s

Request Examples

1. Text-to-Video (t2va)

Uses only the common parameters; content contains only one text element.

ratio is required for text-to-video and cannot be adaptive. Options: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16.

curl --location --request POST 'https://beeroute.ai/v2/video_generation' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "MiniMax-H3",
    "content": [
        {
            "type": "text",
            "text": "Epic space-opera theatrical trailer: a female captain stands alone before a massive observation window as the last fleet assembles and jumps away; a blinding flash erupts, the bridge shakes, and she is left behind."
        }
    ],
    "resolution": "2K",
    "duration": 5,
    "ratio": "16:9"
}'

2. Image-to-Video - First Frame (i2va)

content contains text + 1 image_url (role=first_frame, or omit role; it is treated as the first frame by default).

ratio is always adaptive for image-to-video and is determined by the input image; passing other valid values does not cause an error, but they are ignored and treated as adaptive.

curl --location --request POST 'https://beeroute.ai/v2/video_generation' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "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"
}'

3. Image-to-Video - Last Frame

content contains text + 1 image_url (role=last_frame).

curl --location --request POST 'https://beeroute.ai/v2/video_generation' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "MiniMax-H3",
    "content": [
        {
            "type": "text",
            "text": "The camera slowly pulls back, gradually revealing a sweeping panoramic view."
        },
        {
            "type": "image_url",
            "image_url": {
                "url": "https://example.com/last_frame.png"
            },
            "role": "last_frame"
        }
    ],
    "resolution": "2K",
    "duration": 5
}'

4. Image-to-Video - First and Last Frames

content contains text + 2 image_url items (with role set to first_frame and last_frame respectively).

curl --location --request POST 'https://beeroute.ai/v2/video_generation' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "MiniMax-H3",
    "content": [
        {
            "type": "text",
            "text": "Smoothly transition from the first frame to the second, with the lighting changing softly."
        },
        {
            "type": "image_url",
            "image_url": {
                "url": "https://example.com/first_frame.jpeg"
            },
            "role": "first_frame"
        },
        {
            "type": "image_url",
            "image_url": {
                "url": "https://example.com/last_frame.jpeg"
            },
            "role": "last_frame"
        }
    ],
    "resolution": "2K",
    "duration": 5
}'

5. Multimodal Reference-to-Video (r2va)

Generates a video by fusing a combination of reference images (reference_image), reference videos (reference_video), and reference audio (reference_audio).

Image-to-video and multimodal reference-to-video are mutually exclusive: if any of the reference_image / reference_video / reference_audio roles appears in content, first_frame / last_frame cannot appear (and vice versa).

ratio is optional for multimodal reference-to-video, defaulting to adaptive; you can also explicitly specify a particular ratio.

curl --location --request POST 'https://beeroute.ai/v2/video_generation' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "MiniMax-H3",
    "content": [
        {
            "type": "text",
            "text": "The character says: Follow the wind, live free. Leave worries behind, enjoy the moment. Voice timbre follows Audio 1."
        },
        {
            "type": "video_url",
            "video_url": {
                "url": "https://example.com/reference_video.mp4"
            },
            "role": "reference_video"
        },
        {
            "type": "audio_url",
            "audio_url": {
                "url": "https://example.com/reference_audio.mp3"
            },
            "role": "reference_audio"
        }
    ],
    "resolution": "2K",
    "duration": 5,
    "ratio": "adaptive"
}'

Response Format

200 - Created Successfully

{
    "task_id": "424010985738629"
}

Note: Use the returned task_id to call the query API to get the task status and result. Task records are retained for 7 days; they cannot be queried after expiration.

Error Responses

Authentication failed (401):

{
    "type": "error",
    "error": {
        "type": "authorized_error",
        "message": "login fail: Please carry the API secret key in the 'Authorization' field of the request header (1004)",
        "http_code": "401"
    },
    "request_id": "021785229015510a2c883cf675b9804d"
}

Invalid parameters (400):

{
    "type": "error",
    "error": {
        "type": "bad_request_error",
        "message": "invalid params, content must include a non-empty text item (prompt is required) (2013)",
        "http_code": "400"
    },
    "request_id": "021785229015510a2c883cf675b9804d"
}

Insufficient balance (402):

{
    "type": "error",
    "error": {
        "type": "insufficient_balance_error",
        "message": "insufficient balance (1008)",
        "http_code": "402"
    },
    "request_id": "021785229015510a2c883cf675b9804d"
}

Rate limit triggered (429):

{
    "type": "error",
    "error": {
        "type": "rate_limit_error",
        "message": "rate limit, please retry later (1002)",
        "http_code": "429"
    },
    "request_id": "021785229015510a2c883cf675b9804d"
}

Sensitive content (422):

{
    "type": "error",
    "error": {
        "type": "unprocessable_entity_error",
        "message": "video description contains sensitive content (1026)",
        "http_code": "422"
    },
    "request_id": "021785229015510a2c883cf675b9804d"
}

Server error (500):

{
    "type": "error",
    "error": {
        "type": "server_error",
        "message": "internal error (1000)",
        "http_code": "500"
    },
    "request_id": "021785229015510a2c883cf675b9804d"
}

3. Query Task Status

Video generation usually takes 1-5 minutes; poll the status using the task_id. A polling interval of 15 seconds is recommended.

API Endpoint

GET /v2/query/video_generation/{task_id}

Path Parameters

ParameterTypeRequiredDescription
task_idstringYesThe task_id returned when creating the task

Request Example

curl --location --request GET 'https://beeroute.ai/v2/query/video_generation/424010985738629' \
--header 'Authorization: Bearer sk-xxx'

Response Format

200 - Completed Successfully (Succeeded)

{
    "task": {
        "id": "424010985738629",
        "model": "MiniMax-H3",
        "status": "succeeded",
        "created_at": 1785125529,
        "updated_at": 1785125946,
        "content": {
            "url": "https://xxx/xxx.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"
    }
}

200 - Queued

{
    "task": {
        "id": "424010985738629",
        "model": "MiniMax-H3",
        "status": "queued",
        "created_at": 1785125529,
        "updated_at": 1785125529,
        "resolution": "2K",
        "duration": 5,
        "ratio": "16:9",
        "task_type": "generation",
        "modality": "video"
    }
}

200 - Running

{
    "task": {
        "id": "424010985738629",
        "model": "MiniMax-H3",
        "status": "running",
        "created_at": 1785125529,
        "updated_at": 1785125535,
        "resolution": "2K",
        "duration": 5,
        "ratio": "16:9",
        "task_type": "generation",
        "modality": "video"
    }
}

200 - Task Failed (Failed)

{
    "task": {
        "id": "424010985738630",
        "model": "MiniMax-H3",
        "status": "failed",
        "error": {
            "code": "1026",
            "message": "video description contains sensitive content"
        },
        "created_at": 1785125529,
        "updated_at": 1785125700,
        "resolution": "2K",
        "duration": 5,
        "usage": {
            "total_seconds": 0,
            "input_seconds": 0,
            "output_seconds": 0,
            "input_image_count": 0
        },
        "ratio": "16:9",
        "task_type": "generation",
        "modality": "video"
    }
}

200 - Cancelled

{
    "task": {
        "id": "424010985738631",
        "model": "MiniMax-H3",
        "status": "cancelled",
        "created_at": 1785125529,
        "updated_at": 1785125600,
        "resolution": "2K",
        "duration": 5,
        "ratio": "16:9",
        "task_type": "generation",
        "modality": "video"
    }
}

Key Field Descriptions

FieldTypeDescription
taskobjectTask object wrapping all task information.
task.idstringTask ID.
task.modelstringThe model name used, e.g. MiniMax-H3.
task.statusstringTask status: queued / running / succeeded / failed / cancelled.
task.errorobjectError information; not returned when the task succeeds. When the task fails, it returns code (error code) and message (error details).
task.created_atintegerTask creation time (Unix timestamp, seconds).
task.updated_atintegerTask status update time (Unix timestamp, seconds).
task.contentobjectTask output content. Video generation tasks return content.url (video download link); video regeneration tasks also return content.url.
task.resolutionstringResolution of the task output (768P / 2K).
task.durationintegerDuration of the task output (seconds).
task.usageobjectBilling usage for this request, including total_seconds, input_seconds, output_seconds, and input_image_count.
task.ratiostringAspect ratio of the task output; may be an empty string when not applicable to the current task type.
task.task_typestringTask type: generation (video generation) / regeneration (video regeneration).
task.modalitystringOutput modality: video (for both video generation and video regeneration).

usage Field Descriptions

FieldTypeDescription
total_secondsintegerTotal billed seconds for this request = input seconds + output seconds.
input_secondsintegerBilled seconds of input reference video (counted when a reference video is included).
output_secondsintegerBilled seconds of output video.
input_image_countintegerNumber of images included in this billing.

4. Task Status Transitions

queued → running → succeeded / failed / cancelled
  • The initial query status is usually queued or running.
  • When the status becomes succeeded, task.content.url in the response contains the video download link.
  • If the status is failed, check the task.error.code and task.error.message error information and retry.
  • Task records are retained for 7 days; results cannot be queried after expiration.
  • Video download links are time-limited; please download or transfer them promptly.

5. Scenario Quick Reference

Scenariocontent Compositionratio Requirement
Text-to-video (t2va)text onlyRequired; cannot be adaptive
Image-to-video - first frame (i2va)text + 1 image_url (role=first_frame or omitted)Always adaptive (other values are ignored)
Image-to-video - last frametext + 1 image_url (role=last_frame)Always adaptive (other values are ignored)
Image-to-video - first and last framestext + 2 image_url items (first_frame + last_frame)Always adaptive (other values are ignored)
Multimodal reference-to-video (r2va)text + a combination of reference_image / reference_video / reference_audioOptional, default adaptive

Mutual exclusion rule: first_frame / last_frame cannot be mixed with reference_image / reference_video / reference_audio.


6. Parameter Limits Overview (Quick Reference)

DimensionLimit
modelMiniMax-H3
text max length7000 characters
resolution options768P / 2K
duration range4 ~ 15 seconds (integer)
ratio optionsadaptive / 21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16
Total request body size≤ 64 MB
Image formatJPG / JPEG / PNG / WEBP / HEIC / HEIF
Image single file size≤ 30 MB
Image width/height range[256, 5760] px
Image aspect ratio[0.4, 2.5]
First-frame image count≤ 1
Last-frame image count≤ 1
Reference image count≤ 9
Video formatMP4 / MOV
Video codecVideo: H.264/AVC, H.265/HEVC; audio: AAC, MP3
Video single file size≤ 50 MB
Reference video count≤ 3
Video single clip duration[2, 15] s; total duration ≤ 15 s
Video frame rate[23.976, 60]
Audio formatWAV / MP3
Audio single file size≤ 15 MB
Reference audio count≤ 3
Audio single clip duration[2, 15] s; total duration ≤ 15 s
Task record retention7 days

Last updated 2026-11-27 · Markdown source · llms.txt