curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "An astronaut stands at the edge of the moon looking toward Earth as the camera slowly pushes in",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "A girl naturally grows from childhood into a young adult while her identity remains consistent",
"duration": 5,
"resolution": "768p",
"image_with_roles": [
{"url": "https://example.com/start.jpg", "role": "first_frame"},
{"url": "https://example.com/end.jpg", "role": "last_frame"}
]
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1 and the outfit from image 2 as the character walks through a rainy night street",
"duration": 6,
"resolution": "2K",
"aspect_ratio": "9:16",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"},
{"url": "https://example.com/outfit.png", "role": "reference_image"}
]
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"}
],
"video_with_roles": [
{"url": "https://example.com/motion.mp4", "role": "reference_video"}
],
"audio_with_roles": [
{"url": "https://example.com/voice.mp3", "role": "reference_audio"}
]
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json",
},
json={
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"}
],
"video_with_roles": [
{"url": "https://example.com/motion.mp4", "role": "reference_video"}
],
"audio_with_roles": [
{"url": "https://example.com/voice.mp3", "role": "reference_audio"}
],
},
)
print(response.json())
const response = await fetch("https://toapis.com/v1/videos/generations", {
method: "POST",
headers: {
Authorization: "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "MiniMax-H3",
prompt: "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
duration: 5,
resolution: "2K",
aspect_ratio: "adaptive",
image_with_roles: [
{url: "https://example.com/person.png", role: "reference_image"}
],
video_with_roles: [
{url: "https://example.com/motion.mp4", role: "reference_video"}
],
audio_with_roles: [
{url: "https://example.com/voice.mp3", role: "reference_audio"}
]
})
});
console.log(await response.json());
{
"id": "vid_01KZ3H3EXAMPLE00000000000",
"object": "generation.task",
"model": "MiniMax-H3",
"status": "queued",
"progress": 0,
"created_at": 1785729000
}
MiniMax-H3
MiniMax Hailuo H3 Video Generation
Generate 2K or 768p videos with MiniMax Hailuo H3 using text, first/last frames, or multimodal references
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "An astronaut stands at the edge of the moon looking toward Earth as the camera slowly pushes in",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "A girl naturally grows from childhood into a young adult while her identity remains consistent",
"duration": 5,
"resolution": "768p",
"image_with_roles": [
{"url": "https://example.com/start.jpg", "role": "first_frame"},
{"url": "https://example.com/end.jpg", "role": "last_frame"}
]
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1 and the outfit from image 2 as the character walks through a rainy night street",
"duration": 6,
"resolution": "2K",
"aspect_ratio": "9:16",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"},
{"url": "https://example.com/outfit.png", "role": "reference_image"}
]
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"}
],
"video_with_roles": [
{"url": "https://example.com/motion.mp4", "role": "reference_video"}
],
"audio_with_roles": [
{"url": "https://example.com/voice.mp3", "role": "reference_audio"}
]
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json",
},
json={
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"}
],
"video_with_roles": [
{"url": "https://example.com/motion.mp4", "role": "reference_video"}
],
"audio_with_roles": [
{"url": "https://example.com/voice.mp3", "role": "reference_audio"}
],
},
)
print(response.json())
const response = await fetch("https://toapis.com/v1/videos/generations", {
method: "POST",
headers: {
Authorization: "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "MiniMax-H3",
prompt: "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
duration: 5,
resolution: "2K",
aspect_ratio: "adaptive",
image_with_roles: [
{url: "https://example.com/person.png", role: "reference_image"}
],
video_with_roles: [
{url: "https://example.com/motion.mp4", role: "reference_video"}
],
audio_with_roles: [
{url: "https://example.com/voice.mp3", role: "reference_audio"}
]
})
});
console.log(await response.json());
{
"id": "vid_01KZ3H3EXAMPLE00000000000",
"object": "generation.task",
"model": "MiniMax-H3",
"status": "queued",
"progress": 0,
"created_at": 1785729000
}
Note for users in mainland China: Please use
https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.- Supports three models:
MiniMax-H3,MiniMax-H3-Max, andMiniMax-H3-Max-Turbo MiniMax-H3andMiniMax-H3-Maxsupport text-to-video, first/last-frame generation, and combined image, video, and audio referencesMiniMax-H3-Max-Turbosupports only text-to-video and first/last-frame generation, without reference mediaMiniMax-H3keeps2K/768pand4-15seconds; Max / Max-Turbo support480P/768Pand5-15seconds- Async API that returns a unified
generation.task
MiniMax-H3-Max-Turbo does not support reference_image, reference_video, or reference_audio. Sending reference media returns MiniMax-H3-Max-Turbo does not support reference media. Use MiniMax-H3 or MiniMax-H3-Max for reference videos.Prefer publicly accessible media URLs. First/last-frame mode and multimodal reference mode are mutually exclusive. Reference audio cannot be used alone and requires at least one reference image or video.
Authentication
string
required
All endpoints require Bearer Token authentication.
Authorization: Bearer YOUR_API_KEY
Request Parameters
string
default:"MiniMax-H3"
required
Video generation model name:
MiniMax-H3, MiniMax-H3-Max, or MiniMax-H3-Max-Turbo. Multimodal references are supported only by MiniMax-H3 and MiniMax-H3-Max; Turbo supports only text-to-video and first/last-frame generation.string
required
Video description, up to
7000 characters. Describe the subject, action, scene, camera movement, style, and sound requirements.integer
default:5
MiniMax-H3 accepts 4 through 15; Max / Max-Turbo accept integer values from 5 through 15.string
default:"2K"
MiniMax-H3 accepts 2K and 768p; Max / Max-Turbo accept 480P and 768P.string
default:"16:9"
Output aspect ratio.Options:
21:9, 16:9, 4:3, 1:1, 3:4, 9:16, or adaptive.- Text-to-video: defaults to
16:9;adaptiveis not allowed - First/last-frame mode: always adapts to the input image and ignores a specific ratio
- Multimodal reference mode (
MiniMax-H3andMiniMax-H3-Maxonly): defaults toadaptive, or accepts a specific ratio
string[]
Image URL array for compatibility. New integrations should use
image_with_roles to declare each image’s purpose explicitly.- 1 image: treated as
first_frame - 2 images: treated as
first_frameandlast_framein order - 3-9 images: treated as
reference_image, supported only byMiniMax-H3andMiniMax-H3-Max; not supported by Turbo
Do not send
image_urls and image_with_roles together because image roles may become ambiguous.array
Images with explicit roles.
Show Show image fields
Show Show image fields
string
required
Image URL. Supports JPG, JPEG, PNG, WebP, HEIC, and HEIF. Each file must be no larger than
30 MB, both dimensions must be 256-5760 px, and the aspect ratio must be 0.4-2.5.string
required
Image role:
first_frame- first frame, at most 1 imagelast_frame- last frame, at most 1 imagereference_image- reference image, at most 9 images, supported only byMiniMax-H3andMiniMax-H3-Max; not supported by Turbo
array
Reference videos for multimodal reference mode, up to
3 videos. Supported only by MiniMax-H3 and MiniMax-H3-Max, not by Turbo.Show Show video fields
Show Show video fields
ToAPIs reads the actual reference-video duration for billing. Do not submit a client-calculated duration field.
array
Reference audio for multimodal reference mode, up to
3 audio files. Supported only by MiniMax-H3 and MiniMax-H3-Max, not by Turbo.Show Show audio fields
Show Show audio fields
Reference audio cannot be used alone. Include at least one
reference_image or reference_video.boolean
default:false
Whether to add an AIGC watermark to the generated video.
string
Your business identifier, such as an order or transaction ID. You can query the task using this value through the same status endpoint.
string
ToAPIs task-completion callback URL. Configure the Token URL and signing secret first; see Task Webhooks.
Input Modes
| Mode | Supported models | Input | aspect_ratio |
|---|---|---|---|
| Text-to-video | All three models | prompt | Specific ratio, defaults to 16:9 |
| First-frame video | All three models | prompt + one first_frame | Automatically uses adaptive |
| First/last-frame video | All three models | prompt + first_frame + last_frame | Automatically uses adaptive |
| Multimodal reference | MiniMax-H3 and MiniMax-H3-Max only | prompt + reference images/videos/audio | Defaults to adaptive; a specific ratio is allowed |
MiniMax-H3 and MiniMax-H3-Max only):
- Up to
9reference images - Up to
3reference videos - Up to
3reference audio files - Up to
12media files total - First/last-frame roles cannot be mixed with reference roles
Request Examples
The reference-media examples useMiniMax-H3. You cannot use them by simply changing model to MiniMax-H3-Max-Turbo. To use MiniMax-H3-Max, set resolution to 480P or 768P and duration to 5-15 seconds.
Text-to-video
{
"model": "MiniMax-H3",
"prompt": "An epic space-opera trailer: a captain watches the last fleet jump away through a vast observation window, cinematic lighting",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}
First and last frames
{
"model": "MiniMax-H3",
"prompt": "A girl naturally grows from childhood into a young adult, with a steady camera move and consistent identity",
"duration": 5,
"resolution": "768p",
"image_with_roles": [
{"url": "https://example.com/start.jpg", "role": "first_frame"},
{"url": "https://example.com/end.jpg", "role": "last_frame"}
]
}
Multiple reference images
{
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1 and the outfit from image 2 as the character walks through a rainy night street",
"duration": 6,
"resolution": "2K",
"aspect_ratio": "9:16",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"},
{"url": "https://example.com/outfit.png", "role": "reference_image"}
]
}
Combined video and audio references
{
"model": "MiniMax-H3",
"prompt": "Follow the action and camera rhythm of video 1, then deliver the dialogue using the voice from audio 1",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"video_with_roles": [
{"url": "https://example.com/motion.mp4", "role": "reference_video"}
],
"audio_with_roles": [
{"url": "https://example.com/voice.mp3", "role": "reference_audio"}
]
}
Response
string
ToAPIs task ID used to query task status.
string
Object type, always
generation.task.string
Model used for this request, always
MiniMax-H3.string
Task status:
queued, in_progress, completed, or failed.integer
Task progress percentage from
0 to 100.integer
Task creation time as a Unix timestamp in seconds.
After submission, poll Get Video Task Status. When completed, the video URL is available at
result.data[0].url.curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "An astronaut stands at the edge of the moon looking toward Earth as the camera slowly pushes in",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "A girl naturally grows from childhood into a young adult while her identity remains consistent",
"duration": 5,
"resolution": "768p",
"image_with_roles": [
{"url": "https://example.com/start.jpg", "role": "first_frame"},
{"url": "https://example.com/end.jpg", "role": "last_frame"}
]
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1 and the outfit from image 2 as the character walks through a rainy night street",
"duration": 6,
"resolution": "2K",
"aspect_ratio": "9:16",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"},
{"url": "https://example.com/outfit.png", "role": "reference_image"}
]
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"}
],
"video_with_roles": [
{"url": "https://example.com/motion.mp4", "role": "reference_video"}
],
"audio_with_roles": [
{"url": "https://example.com/voice.mp3", "role": "reference_audio"}
]
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json",
},
json={
"model": "MiniMax-H3",
"prompt": "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [
{"url": "https://example.com/person.png", "role": "reference_image"}
],
"video_with_roles": [
{"url": "https://example.com/motion.mp4", "role": "reference_video"}
],
"audio_with_roles": [
{"url": "https://example.com/voice.mp3", "role": "reference_audio"}
],
},
)
print(response.json())
const response = await fetch("https://toapis.com/v1/videos/generations", {
method: "POST",
headers: {
Authorization: "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "MiniMax-H3",
prompt: "Keep the person from image 1, follow the motion and camera rhythm of video 1, and use the voice from audio 1",
duration: 5,
resolution: "2K",
aspect_ratio: "adaptive",
image_with_roles: [
{url: "https://example.com/person.png", role: "reference_image"}
],
video_with_roles: [
{url: "https://example.com/motion.mp4", role: "reference_video"}
],
audio_with_roles: [
{url: "https://example.com/voice.mp3", role: "reference_audio"}
]
})
});
console.log(await response.json());
{
"id": "vid_01KZ3H3EXAMPLE00000000000",
"object": "generation.task",
"model": "MiniMax-H3",
"status": "queued",
"progress": 0,
"created_at": 1785729000
}