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": "リクエストパラメータが無効です",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "認証に失敗しました。APIキーをご確認ください",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "残高不足です。チャージしてから再試行してください",
"type": "payment_required"
}
}
MiniMax-H3
MiniMax-H3 Context-IR プロンプト強化
- マルチモーダルな文脈理解により、強化された構造化プロンプトを生成(テキストのみ、動画は生成しない)
- H3 動画生成と同じメディアフィールドと相互排他ルールを共有
- トークン課金。通常 20〜40 秒で完了
- 単体でも、768P プレビュー → 2K 再生成ワークフローのステップ 1 としても利用可能
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": "リクエストパラメータが無効です",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "認証に失敗しました。APIキーをご確認ください",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "残高不足です。チャージしてから再試行してください",
"type": "payment_required"
}
}
Full 2K Workflow(任意):① Context-IR でプロンプトを強化 → ② MiniMax-H3 で
768P プレビュー → ③ Regeneration で 2K にアップスケール。合算単価は直出 2K と同等で、試行コストを抑えられます。本エンドポイント単体でも利用できます。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": "リクエストパラメータが無効です",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "認証に失敗しました。APIキーをご確認ください",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "残高不足です。チャージしてから再試行してください",
"type": "payment_required"
}
}
認証
string
必須
Bearer Token 認証。APIキー管理ページ でキーを取得してください。
Authorization: Bearer YOUR_API_KEY
概要
アイデアと任意のメディアを送り、マルチモーダル理解の結果として構造化され、より豊かなプロンプトを受け取ります。- 動画は生成されません。 結果は
result.promptに入ります(result.videosではありません) - メディアフィールドは 動画生成 と同じ検証ルールを使います(先頭/末尾フレームと参照の相互排他、音声のみ不可)。同じ入力を続けて生成に渡せます
{
"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 をそのまま MiniMax-H3 の prompt に渡してください。
リクエストパラメータ
string
必須
固定値:
MiniMax-H3-Context-IRboolean
デフォルト:"false"
Context-IR タスクを送信する前にコンテンツモデレーションを実行するかどうかを指定します。
true:omni-moderation-latestでプロンプトと入力画像を審査falseまたは省略:審査リクエストを行わず、審査コストや遅延を追加しない(デフォルト)
string
必須
元のアイデアテキスト、≤ 7000 文字
integer
デフォルト:"5"
目標動画の長さ(秒)、4〜15、デフォルト
5。強化プロンプト内のテンポ表現に影響します。string
目標アスペクト比。テキストのみ入力時は必須で、
adaptive は不可。よく使う値:16:9、9:16、1:1、4:3、3:4、21:9 など。string
先頭フレーム画像の URL
string
末尾フレーム画像の URL
string[]
参照画像(常に参照として扱う)、≤ 9
object[]
役割付き画像:
first_frame / last_frame / reference_imagestring[]
参照動画、≤ 3;各 2〜15 秒、合計 ≤ 15 秒
string[]
参照音声、≤ 3;単独使用不可 — 画像または動画と組み合わせてください
課金
トークン課金(H3 ファミリーで唯一トークン課金のモデル):| 項目 | 単価 |
|---|---|
| 入力 tokens | $0.87 / 百万 |
| 出力 tokens | $3.45 / 百万 |
prompt_tokens / completion_tokens で精算(余剰返金 / 不足分請求)。マルチモーダル入力は入力 tokens を大きく増やします。
注意事項
- 通常 20〜40 秒。3〜5 秒ごとに タスク状態 をポーリングしてください。
- パラメータ不正 → 同期 400(タスクなし、課金なし)。実行時失敗は
failedとなり自動返金。 - ワークフロー全体の説明は Regeneration ページを参照。
Response
integer
ステータスコード。成功時は 200