curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3-Context-IR",
"prompt": "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
"duration": 5,
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3-Context-IR",
"prompt": "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
"duration": 5,
"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-Context-IR",
prompt: "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
duration: 5,
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));
{
"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"
}
}
MiniMax-H3
MiniMax-H3 Context-IR amélioration de prompt
- Compréhension multimodale du contexte produisant un prompt structuré enrichi (texte uniquement, pas de vidéo)
- Partage les mêmes champs médias et règles d’exclusion mutuelle que la génération vidéo H3
- Facturation au token ; se termine en général en 20~40 secondes
- Utilisable seul, ou comme étape 1 du workflow aperçu 768P → régénération 2K
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-Context-IR",
"prompt": "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
"duration": 5,
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3-Context-IR",
"prompt": "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
"duration": 5,
"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-Context-IR",
prompt: "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
duration: 5,
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));
{
"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"
}
}
Full 2K Workflow (optionnel) : ① Context-IR enrichit le prompt → ② MiniMax-H3 en
768P pour un aperçu → ③ Regeneration monte en 2K. Les prix unitaires combinés correspondent au 2K direct, avec des itérations moins chères. Vous pouvez aussi appeler cet endpoint seul.curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3-Context-IR",
"prompt": "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
"duration": 5,
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3-Context-IR",
"prompt": "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
"duration": 5,
"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-Context-IR",
prompt: "Epic space-opera trailer: a female captain alone before a huge viewport as the last fleet gathers and jumps away.",
duration: 5,
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));
{
"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"
}
}
Autorisation
string
requis
Authentification Bearer Token. Obtenez une clé sur la page de gestion des API Keys.
Authorization: Bearer YOUR_API_KEY
Aperçu
Envoyez votre idée et éventuellement des médias pour une compréhension multimodale ; recevez un prompt structuré et plus riche.- Aucune vidéo n’est produite. Le résultat est dans
result.prompt(pasresult.videos) - Les champs médias utilisent les mêmes règles de validation que la génération vidéo (exclusion mutuelle trames vs références ; l’audio ne peut pas être seul), afin de réutiliser les mêmes entrées pour la génération
{
"code": 200,
"data": {
"actual_time": 28,
"completed": 1700000128,
"cost": 0.011204,
"created": 1700000100,
"credits_cost": 0.11204,
"estimated_time": 100,
"id": "task_01J9HA7J*************",
"progress": 100,
"result": {
"prompt": "integrated_multimodal_description: [Shot 1] Cinematic, close-up shot. The camera slowly pushes in on a lone adult astronaut standing in a dimly lit, metallic corridor. The astronaut wears a weathered, white and silver extravehicular spacesuit heavily scuffed with grey dust, featuring a completely opaque, gold-tinted helmet visor. The astronaut slowly pushes open a rusted, thick steel airlock door on the right side of the frame. As the heavy metal door shifts, a sudden, intense beam of vibrant green light spills across the dark frame, illuminating the intricate fabric folds of the suit. The curved golden visor vividly reflects a dense, tangled mass of luminescent green leaves and vines. [Shot 2] At 00:02.500, the camera cuts to a wide shot from directly behind the astronaut from Shot 1, smoothly pedestaling up to reveal the interior of the abandoned orbital station. The vast, hexagonal titanium room is completely overrun by a lush, zero-gravity living garden. Giant, emerald-green vines spiral tightly around cracked, grey ceiling support beams, while thick patches of bioluminescent cyan moss emit a soft glow from the rusted floor grid. Several large, perfectly spherical water droplets float weightlessly in the midground, refracting the ambient green light. The astronaut lowers their heavy, white-gloved hands to their sides, standing perfectly motionless before the massive canopy of overgrown flora.\noverall_soundscape: A loud, grinding metallic creak dominates the foreground as the heavy steel door shifts, instantly followed by a pronounced, high-pitched hiss of escaping pressurized air. A continuous, low-frequency mechanical hum rumbles in the background, establishing the station's deadened room tone. As the space opens, the distinct, crisp rustle of thick foliage is clearly heard, accompanied by soft, resonant liquid plops as unseen water drops collide in the metallic chamber.\nnon_diegetic_music: Ambient electronic score, slow tempo, featuring a deep, sustained synthesizer drone heavily overlaid with delicate, shimmering glockenspiel notes and a solitary, reverberating cello."
},
"status": "completed",
"usage": {
"input_tokens": 5512,
"output_tokens": 2388,
"total_tokens": 7900
}
}
}
result.prompt tel quel à MiniMax-H3 comme prompt.
Paramètres de la requête
string
requis
Valeur fixe :
MiniMax-H3-Context-IRboolean
défaut:"false"
Indique s’il faut modérer le contenu avant d’envoyer la tâche Context-IR.
true: vérifier les prompts et les images d’entrée avecomni-moderation-latestfalseou omis : ne pas envoyer de requête de modération, sans coût ni latence de modération supplémentaires (par défaut)
string
requis
Texte d’idée original, ≤ 7000 caractères
integer
défaut:"5"
Durée cible de la vidéo (secondes), 4~15, défaut
5. Influence le langage de rythme dans le prompt enrichi.string
Ratio d’aspect cible. Obligatoire pour une entrée texte seule, et ne peut pas être
adaptive.Valeurs courantes : 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, etc.string
URL de l’image de première trame
string
URL de l’image de dernière trame
string[]
Images de référence (toujours traitées comme références), ≤ 9
object[]
Images avec rôles :
first_frame / last_frame / reference_imagestring[]
Vidéos de référence, ≤ 3 ; chacune 2~15 s, total ≤ 15 s
string[]
Audio de référence, ≤ 3 ; ne peut pas être utilisé seul — associez-le à une image ou une vidéo
Facturation
Basée sur les tokens (seul modèle de la famille H3 facturé aux tokens) :| Élément | Prix |
|---|---|
| Tokens d’entrée | $0.87 / million |
| Tokens de sortie | $3.45 / million |
prompt_tokens / completion_tokens réels (remboursement de l’excédent / complément). Les entrées multimodales augmentent fortement les tokens d’entrée.
Notes
- Habituellement 20~40 secondes ; interrogez le statut de tâche toutes les 3~5 secondes.
- Mauvais paramètres → 400 synchrone (pas de tâche, pas de facturation) ; échecs d’exécution →
failedavec remboursement auto. - Les notes du workflow complet sont sur la page Regeneration.
Response
integer
Code de statut ; 200 en cas de succès