curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "MiniMax-H3",
prompt: "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
duration: 5,
resolution: "2K",
aspect_ratio: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.apimart.ai/v1/videos/generations";
String payload = """
{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$url = "https://api.apimart.ai/v1/videos/generations";
$payload = [
"model" => "MiniMax-H3",
"prompt" => "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration" => 5,
"resolution" => "2K",
"aspect_ratio" => "16:9"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
require 'net/http'
require 'json'
require 'uri'
url = URI("https://api.apimart.ai/v1/videos/generations")
payload = {
model: "MiniMax-H3",
prompt: "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
duration: 5,
resolution: "2K",
aspect_ratio: "16:9"
}
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = payload.to_json
response = http.request(request)
puts response.body
import Foundation
let url = URL(string: "https://api.apimart.ai/v1/videos/generations")!
let payload: [String: Any] = [
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
]
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
print("Error: \(error)")
return
}
if let data = data, let responseString = String(data: data, encoding: .utf8) {
print(responseString)
}
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var url = "https://api.apimart.ai/v1/videos/generations";
var payload = @"{
""model"": ""MiniMax-H3"",
""prompt"": ""A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work"",
""duration"": 5,
""resolution"": ""2K"",
""aspect_ratio"": ""16:9""
}";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance, please top up and try again",
"type": "payment_required"
}
}
{
"error": {
"code": 422,
"message": "Content safety review failed",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error, please retry later",
"type": "server_error"
}
}
MiniMax-H3
Pembuatan Video MiniMax-H3
- Mode pemrosesan async, mengembalikan ID tugas untuk kueri berikutnya
- Mendukung teks-ke-video, gambar-ke-video (frame pertama / akhir / pertama+akhir), dan referensi multimodal ke video (gambar referensi + video + audio)
- Output native 2K, durasi 4 ~ 15 detik, dengan track audio
- Berbagi API submit dan query yang sama dengan MiniMax-Hailuo-02 / MiniMax-Hailuo-2.3
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "MiniMax-H3",
prompt: "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
duration: 5,
resolution: "2K",
aspect_ratio: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.apimart.ai/v1/videos/generations";
String payload = """
{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$url = "https://api.apimart.ai/v1/videos/generations";
$payload = [
"model" => "MiniMax-H3",
"prompt" => "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration" => 5,
"resolution" => "2K",
"aspect_ratio" => "16:9"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
require 'net/http'
require 'json'
require 'uri'
url = URI("https://api.apimart.ai/v1/videos/generations")
payload = {
model: "MiniMax-H3",
prompt: "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
duration: 5,
resolution: "2K",
aspect_ratio: "16:9"
}
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = payload.to_json
response = http.request(request)
puts response.body
import Foundation
let url = URL(string: "https://api.apimart.ai/v1/videos/generations")!
let payload: [String: Any] = [
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
]
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
print("Error: \(error)")
return
}
if let data = data, let responseString = String(data: data, encoding: .utf8) {
print(responseString)
}
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var url = "https://api.apimart.ai/v1/videos/generations";
var payload = @"{
""model"": ""MiniMax-H3"",
""prompt"": ""A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work"",
""duration"": 5,
""resolution"": ""2K"",
""aspect_ratio"": ""16:9""
}";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance, please top up and try again",
"type": "payment_required"
}
}
{
"error": {
"code": 422,
"message": "Content safety review failed",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error, please retry later",
"type": "server_error"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "MiniMax-H3",
prompt: "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
duration: 5,
resolution: "2K",
aspect_ratio: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.apimart.ai/v1/videos/generations";
String payload = """
{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$url = "https://api.apimart.ai/v1/videos/generations";
$payload = [
"model" => "MiniMax-H3",
"prompt" => "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration" => 5,
"resolution" => "2K",
"aspect_ratio" => "16:9"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
require 'net/http'
require 'json'
require 'uri'
url = URI("https://api.apimart.ai/v1/videos/generations")
payload = {
model: "MiniMax-H3",
prompt: "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
duration: 5,
resolution: "2K",
aspect_ratio: "16:9"
}
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = payload.to_json
response = http.request(request)
puts response.body
import Foundation
let url = URL(string: "https://api.apimart.ai/v1/videos/generations")!
let payload: [String: Any] = [
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
]
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
print("Error: \(error)")
return
}
if let data = data, let responseString = String(data: data, encoding: .utf8) {
print(responseString)
}
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var url = "https://api.apimart.ai/v1/videos/generations";
var payload = @"{
""model"": ""MiniMax-H3"",
""prompt"": ""A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work"",
""duration"": 5,
""resolution"": ""2K"",
""aspect_ratio"": ""16:9""
}";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance, please top up and try again",
"type": "payment_required"
}
}
{
"error": {
"code": 422,
"message": "Content safety review failed",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error, please retry later",
"type": "server_error"
}
}
Otorisasi
string
wajib
Semua endpoint API memerlukan autentikasi Bearer TokenDapatkan API Key Anda:Kunjungi Halaman Manajemen API Key untuk mendapatkan API Key AndaTambahkan ke header permintaan:
Authorization: Bearer YOUR_API_KEY
Mode Pembuatan
MiniMax-H3 merutekan ke mode yang sesuai dari field permintaan secara otomatis. Anda tidak memerlukan fieldmode:
| Mode | Pemicu | Kemampuan |
|---|---|---|
| Teks-ke-Video (T2V) | Hanya prompt dan field umum | Pembuatan murni berbasis teks |
| Gambar-ke-Video (I2V) | first_frame_image / last_frame_image (atau first_frame / last_frame di image_with_roles) | Kontrol frame pertama, frame akhir, frame pertama+akhir |
| Referensi Multimodal (R2V) | image_urls / video_urls / audio_urls, atau reference_image di image_with_roles | Gambar referensi + video + audio |
Saling eksklusif secara ketat: Field gambar-ke-video (
first_frame_image / last_frame_image, dan first_frame / last_frame di image_with_roles) tidak dapat digabungkan dengan field referensi multimodal (image_urls, video_urls, audio_urls, dan reference_image di image_with_roles). Mencampurkannya akan mengembalikan 400.Audio saja tidak diizinkan. Jika Anda mengirim
audio_urls, Anda juga harus menyediakan setidaknya satu gambar referensi atau video referensi.Parameter Permintaan
Field Umum
string
wajib
Nilai tetap:
MiniMax-H3model wajib dan harus dikirim secara eksplisit. Klien yang sudah terintegrasi dengan Hailuo dapat beralih dengan mengatur model ke MiniMax-H3.string
wajib
Deskripsi konten video. Wajib dan tidak boleh kosong di setiap skenario, maks. 7000 karakter per permintaan.Jelaskan adegan, subjek, gerakan, dan gaya secara detail untuk hasil yang lebih baik.Contoh:
"A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work"integer
default:"5"
Durasi output (detik)
- Rentang: bilangan bulat dari
4hingga15 - Default:
5
string
default:"2K"
Resolusi video
- Nilai yang didukung: hanya
2K(default)
string
Rasio aspek. Anda juga dapat mengirim
size atau ratio dengan efek yang sama.Rasio yang diizinkan: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16Perilaku per skenario dijelaskan di “Aturan Rasio Aspek” di bawah.boolean
default:"false"
Apakah menambahkan watermark AIGCDefault:
falseAlias kompatibel: aigc_watermarkstring
URL yang menerima push saat tugas mencapai status terminal (berhasil / gagal)
Gunakan
webhook. Jangan mengirim callback_url resmi. callback_url dicadangkan untuk penggunaan internal dan tidak diterima dari pengguna.Field Gambar-ke-Video
Untuk gambar-ke-video frame pertama / akhir, tentukan peran secara eksplisit. Jangan menyimpulkan dari jumlahimage_urls.
string
URL gambar frame pertamaSaat disediakan, gambar ini digunakan sebagai frame awal video.
string
URL gambar frame akhirSaat disediakan, gambar ini digunakan sebagai frame penutup. Gabungkan dengan
first_frame_image untuk kontrol frame pertama+akhir.Field Referensi Multimodal
string[]
Array URL gambar referensi
Setiap gambar di
image_urls diperlakukan sebagai gambar referensi (reference_image), terlepas dari jumlahnya. Gambar tidak pernah dipetakan otomatis ke frame pertama / pertama+akhir berdasarkan panjang array.- Jumlah: ≤ 9
string[]
Array URL video referensi
- Jumlah: ≤ 3
- Format dan batasan: lihat “Batasan Media Input” di bawah
string[]
Array URL audio referensi
- Jumlah: ≤ 3
- Tidak dapat digunakan sendiri; harus dipasangkan dengan gambar referensi atau video referensi
Array Gambar Bersama (Formulir Opsional)
object[]
Array gambar ber-tag peran. Dapat menggantikan
Contoh (frame pertama + akhir):Contoh (gambar referensi):
first_frame_image / last_frame_image / image_urls. Setiap elemen:Tampilkan elemen image_with_roles
Tampilkan elemen image_with_roles
{
"image_with_roles": [
{"url": "https://example.com/start.png", "role": "first_frame"},
{"url": "https://example.com/end.png", "role": "last_frame"}
]
}
{
"image_with_roles": [
{"url": "https://example.com/char.png", "role": "reference_image"}
]
}
Aturan Rasio Aspek
| Skenario | Perilaku aspect_ratio |
|---|---|
| Teks-ke-video (hanya prompt) | Harus rasio konkret; dihilangkan atau adaptive jatuh kembali ke 16:9 |
| Gambar-ke-video (frame pertama / akhir) | Ditentukan oleh gambar input; nilai apa pun diabaikan (selalu adaptive) |
| Referensi multimodal | Opsional, default adaptive; juga dapat menetapkan rasio eksplisit |
21:9, 16:9, 4:3, 1:1, 3:4, 9:16.
Batasan Media Input
Ukuran total body permintaan ≤ 64 MB. Gunakan URL publik untuk file besar; jangan gunakan Base64.Gambar
| Item | Batasan |
|---|---|
| Format | JPG / JPEG / PNG / WEBP / HEIC / HEIF |
| Per file | ≤ 30 MB |
| Lebar / tinggi | 256 ~ 5760 px |
| Rasio aspek (l/t) | 0,4 ~ 2,5 |
| Jumlah | Frame pertama ≤ 1, frame akhir ≤ 1, gambar referensi ≤ 9 |
Video (hanya referensi multimodal)
| Item | Batasan |
|---|---|
| Format | MP4 (.mp4), MOV (.mov) |
| Codec | Video H.264/AVC, H.265/HEVC; audio AAC, MP3 |
| Per file | ≤ 50 MB |
| Jumlah | ≤ 3 |
| Durasi | Per klip 2 ~ 15 dtk; total durasi ≤ 15 dtk |
| Ukuran / rasio / FPS | 256 ~ 5760 px / 0,4 ~ 2,5 / 23,976 ~ 60 |
Audio (hanya referensi multimodal)
| Item | Batasan |
|---|---|
| Format | WAV, MP3 |
| Per file | ≤ 15 MB |
| Jumlah | ≤ 3 |
| Durasi | Per klip 2 ~ 15 dtk; total durasi ≤ 15 dtk |
Batasan Parameter
Pelanggaran ditolak dengan 400 (konten sensitif dapat mengembalikan 422) dan tidak ditagih:| Parameter | Batasan |
|---|---|
prompt | Wajib dan tidak boleh kosong di setiap skenario, ≤ 7000 karakter |
duration | Hanya bilangan bulat dari 4 hingga 15 |
resolution | Hanya 2K |
aspect_ratio | Lihat “Aturan Rasio Aspek”; T2V jatuh kembali ke 16:9 jika dihilangkan |
| Frame pertama/akhir vs aset referensi | Saling eksklusif, tidak dapat dicampur |
audio_urls | Tidak dapat digunakan sendiri; harus dipasangkan dengan gambar atau video referensi |
| Gambar referensi | ≤ 9 |
| Video referensi | ≤ 3 |
| Audio referensi | ≤ 3 |
| Kegagalan probe video referensi | Mengembalikan input_video_probe_failed (URL tidak dapat dijangkau atau file rusak), tidak ditagih |
Respons
integer
Kode status respons, 200 jika berhasil
array
Contoh Permintaan
Kasus 1: Teks-ke-Video
{
"model": "MiniMax-H3",
"prompt": "A boy playing basketball by the sea at dusk, waves crashing, cinematic camera work",
"duration": 6,
"resolution": "2K",
"aspect_ratio": "16:9"
}
Kasus 2: Gambar-ke-Video — Frame Pertama
{
"model": "MiniMax-H3",
"prompt": "Pull focus to the people in the background and add more steam to the ramen bowl.",
"first_frame_image": "https://cdn.example.com/ramen.png",
"duration": 5,
"resolution": "2K"
}
Kasus 3: Gambar-ke-Video — Frame Pertama + Akhir
{
"model": "MiniMax-H3",
"prompt": "Camera slowly transitions from morning light to sunset",
"first_frame_image": "https://cdn.example.com/morning.png",
"last_frame_image": "https://cdn.example.com/sunset.png",
"duration": 8
}
Kasus 4: Referensi Multimodal ke Video
{
"model": "MiniMax-H3",
"prompt": "Character speaks: Follow the wind, live free. Leave worries behind, enjoy the moment. Voice references audio 1",
"image_with_roles": [
{"url": "https://cdn.example.com/char.png", "role": "reference_image"}
],
"video_urls": ["https://cdn.example.com/ref_motion.mp4"],
"audio_urls": ["https://cdn.example.com/ref_voice.mp3"],
"duration": 5,
"resolution": "2K"
}
Kasus 5: Frame Pertama + Akhir melalui image_with_roles
{
"model": "MiniMax-H3",
"prompt": "Camera slowly transitions from morning light to sunset",
"image_with_roles": [
{"url": "https://cdn.example.com/morning.png", "role": "first_frame"},
{"url": "https://cdn.example.com/sunset.png", "role": "last_frame"}
],
"duration": 8
}
Kueri Hasil TugasPembuatan video bersifat asinkron dan mengembalikan
task_id saat dikirim. Gunakan endpoint Dapatkan Status Tugas untuk memantau progres dan hasil.Interval poll yang disarankan: setiap 5 ~ 10 detik. Timeout klien: 15 menit. Saat berhasil, result.videos[0].url adalah URL mp4. URL video kedaluwarsa dalam sekitar 24 jam — simpan segera. Tugas yang gagal otomatis diganti uangnya.⌘I