MiniMax H3
curl --request POST \
--url https://api.mixroute.ai/v1/video/generationsimport requests
url = "https://api.mixroute.ai/v1/video/generations"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.mixroute.ai/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixroute.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mixroute.ai/v1/video/generations"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mixroute.ai/v1/video/generations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixroute.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyVideo Series
MiniMax H3
MiniMax H3 video generation parameters, multimodal inputs, and output settings.
MiniMax H3
curl --request POST \
--url https://api.mixroute.ai/v1/video/generationsimport requests
url = "https://api.mixroute.ai/v1/video/generations"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.mixroute.ai/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixroute.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mixroute.ai/v1/video/generations"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mixroute.ai/v1/video/generations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixroute.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyMiniMax-H3 supports text-to-video, frame-based image-to-video, and multimodal reference generation. Keep model and prompt at the root and place the provider’s content and output controls in metadata.
POST https://api.mixroute.ai/v1/video/generations
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Use the case-sensitive MixRoute model ID MiniMax-H3. |
prompt | string | Yes | MixRoute prompt, consistent with the text in metadata.content. |
metadata | object | Yes | Container for the required provider fields below. |
metadata.content | object[] | Yes | Multimodal input list. Every request must contain at least one nonempty text item. Text-only generation uses one text item; image/video/audio inputs must follow the mode rules below. |
metadata.resolution | string | Yes | Output resolution: 768P or 2K, with exact capitalization. Supply an explicit value. |
metadata.duration | integer | Yes | Output duration in whole seconds, from 4 through 15 inclusive. Supply an explicit value. |
metadata.ratio | string | Conditional | Values: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16. Default adaptive except that text-only generation must explicitly choose a concrete ratio. Frame-based generation always uses the input image ratio. |
metadata.callback_url | string | No | Callback URL for task-status changes. The first request carries challenge, which must be returned unchanged within 3 seconds. Subsequent POST notifications use the provider task-query schema, with statuses queued, running, succeeded, failed, or cancelled. |
Content Items
| Field | Type | Required | Description |
|---|---|---|---|
metadata.content[].type | string | Yes | text, image_url, video_url, or audio_url. |
metadata.content[].text | string | Conditional | Required for text items; nonempty, at most 7000 characters per item. |
metadata.content[].image_url.url | string | Conditional | Required for image items. Public URL, accessible mm_file://{file_id}, or data:image/<format>;base64,... with lowercase format. |
metadata.content[].video_url.url | string | Conditional | Required for video references. Public URL, accessible mm_file://{file_id}, or data:video/mp4;base64,.... |
metadata.content[].audio_url.url | string | Conditional | Required for audio references. Public URL, accessible mm_file://{file_id}, or data:audio/<format>;base64,... with lowercase format. |
metadata.content[].role | string | Conditional | Use first_frame or last_frame for frame-based generation; a single image without a role defaults to first frame. Reference inputs use reference_image, reference_video, or reference_audio, matching the content type. |
Input Modes
| Mode | metadata.content | metadata.ratio |
|---|---|---|
| Text-to-video | text | Required concrete ratio; adaptive is not allowed. |
| First frame | text + image_url (first_frame) | Always adaptive; another valid ratio is ignored. |
| Last frame | text + image_url (last_frame) | Always adaptive, matching the image. |
| First and last frames | text + 2 image_url (first_frame, last_frame) | Always adaptive; another valid ratio is ignored. |
| Reference-to-video | text + reference_* | Optional; defaults to adaptive. A concrete ratio may be specified. |
MiniMax-H3, not other H3 variants.
Media Limits
| Media | Constraints |
|---|---|
| Image | JPG/JPEG/PNG/WebP/HEIC/HEIF; at most 30 MB each; dimensions 256-5760 px; aspect ratio 0.4-2.5. At most one first frame, one last frame, or nine reference images. |
| Reference video | MP4/MOV; H.264/H.265 video and AAC/MP3 audio. At most 50 MB each, three clips, 2-15 s per clip and at most 15 s total; dimensions 256-5760 px, ratio 0.4-2.5, and frame rate 23.976-60 fps. |
| Reference audio | WAV/MP3; at most 15 MB each, three clips, 2-15 s per clip and at most 15 s total. |
| Request | At most 64 MB including Base64 overhead. Prefer public URLs for large inputs. |
Examples
SetMIXROUTE_API_KEY before calling the API. Replace media placeholders with accessible inputs. Accepted requests create billable generation tasks; do not automatically resubmit after a submission timeout.
- Text to video
- First and last frames
- Video and audio reference
curl --location "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "MiniMax-H3",
"prompt": "A blue circle gently pulses on a clean white background.",
"metadata": {
"content": [
{
"type": "text",
"text": "A blue circle gently pulses on a clean white background."
}
],
"resolution": "768P",
"duration": 4,
"ratio": "9:16"
}
}'
curl --location "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "MiniMax-H3",
"prompt": "A professor is teaching a class in a classroom.",
"metadata": {
"content": [
{
"type": "text",
"text": "A professor is teaching a class in a classroom."
},
{
"type": "image_url",
"image_url": {
"url": "https://static.freebeatfit.com/aiImageEdit/result/L001510027166320955392/1780060289776-1.png"
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "https://static.freebeatfit.com/aiImageEdit/result/M1509975287180300288_0004_1780047826.png"
},
"role": "last_frame"
}
],
"resolution": "768P",
"duration": 4,
"ratio": "adaptive"
}
}'
curl --location "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "MiniMax-H3",
"prompt": "Preserve the scene in the reference video and follow the reference audio.",
"metadata": {
"content": [
{
"type": "text",
"text": "Preserve the scene in the reference video and follow the reference audio."
},
{
"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": 4,
"ratio": "adaptive"
}
}'
Python
import json
import os
import requests
payload = json.loads(r'''
{
"model": "MiniMax-H3",
"prompt": "A blue circle gently pulses on a clean white background.",
"metadata": {
"content": [
{
"type": "text",
"text": "A blue circle gently pulses on a clean white background."
}
],
"resolution": "768P",
"duration": 4,
"ratio": "9:16"
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=60,
)
response.raise_for_status()
print(response.json())