MiniMax H3
Overview
MiniMax H3, also known as Hailuo 03, supports text-to-video and image-to-video generation at 480P, 768P, and 2K with native stereo sound.
Test API KEY: key_00000000000000000000000000000000Endpoints
1. Create Task
Request
POST https://api.pixwithapi.online/api/task/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Generation prompt, 1–5000 characters. |
| model_id | string | Yes | 2-78 |
| image_urls | array | No | For image-to-video, provide one required first-frame JPG/PNG URL and an optional second last-frame URL. Providing images automatically selects image-to-video. |
| options | object | Yes | Generation options. |
| options.prompt_optimization | boolean | No | Translate and optimize the prompt before generation. Default: true. |
| options.duration | int | Yes | Output duration. Valid values: 5, 10, or 15 seconds. |
| options.resolution | string | No | Output resolution. Valid values: 480P, 768P, 2K. Default: 480P. |
| options.aspect_ratio | string | Conditional | Required for text-to-video. Valid values: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16. Ignored for image-to-video. |
Example Request — Text-to-Video
{
"prompt": "A silver airship gliding above a sunrise city, cinematic camera movement",
"model_id": "2-78",
"options": {
"prompt_optimization": true,
"duration": 10,
"resolution": "480P",
"aspect_ratio": "16:9"
}
}Example Request — Image-to-Video
{
"prompt": "The camera slowly pushes forward as clouds move across the skyline",
"image_urls": [
"https://cdn.pixwithapi.online/images/example_first_frame.jpg",
"https://cdn.pixwithapi.online/images/example_last_frame.jpg"
],
"model_id": "2-78",
"options": {
"prompt_optimization": true,
"duration": 10,
"resolution": "2K"
}
}2. Create Task With R2V
MiniMax H3 R2V generates video from a prompt and reference media. Reference images establish the subject and visual style; optional videos and audio can guide motion and sound. It supports 1–5 images, up to 3 videos, and up to 3 audio clips.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | 2-79. |
| prompt | string | Yes | Generation prompt, 1–5000 characters. |
| reference_urls | object | Yes | Reference media URLs; use this instead of image_urls. |
| reference_urls.reference_images | array of URLs | Yes | 1–5 reference images. |
| reference_urls.reference_videos | array of URLs | No | Up to 3 reference videos. |
| reference_urls.reference_audios | array of URLs | No | Up to 3 reference audio clips. |
| options | object | No | Output settings. Omitted fields use the defaults below. |
| options.prompt_optimization | boolean | No | Translate and optimize the prompt before generation. Default: true. |
| options.duration | int | No | Output duration in seconds: 5, 10, or 15. Default: 5. |
| options.resolution | string | No | Output resolution: 480P, 768P, or 2K. Default: 480P. |
| options.aspect_ratio | string | No | Output aspect ratio: 21:9, 16:9, 4:3, 1:1, 3:4, or 9:16. Auto is also allowed at 768P and 2K, but not at 480P. Default: 16:9. |
{
"model_id": "2-79",
"prompt": "Use the reference subject and movement to make a cinematic video",
"reference_urls": {
"reference_images": ["https://media.example.com/subject.jpg"],
"reference_videos": ["https://media.example.com/motion.mp4"],
"reference_audios": []
},
"options": {
"prompt_optimization": true,
"duration": 10,
"resolution": "480P",
"aspect_ratio": "16:9"
}
}Response
{"code":1,"message":"success","data":{"task_id":"d425ab4dc256f0ebaa84862b9cea8a3d"}}Last updated on