API ReferenceVideo APIs

MiniMax H3 API

ReachAPI は公開モデル ID minimax-h3 を通じて MiniMax Hailuo-03 を提供し、統一された非同期動画タスク API を使用します。

  • タスク作成: POST /v1/vids/create
  • タスク照会: GET /v1/tasks/{task_id}
  • 実行方式: 非同期。タスク API をポーリングするか callback_url を指定
  • モデル ID: minimax-h3

認証

Authorization: Bearer YOUR_REACH_API_KEY
Content-Type: application/json

機能と価格

長さ解像度アスペクト比入力モード
415 秒の整数2K768P21:916:94:31:13:49:16adaptiveテキスト、先頭フレーム、先頭・末尾フレーム、マルチモーダル参照

input.content は必須で、空でないテキスト項目を 1 つ以上含める必要があります。旧フィールドの promptimage_urlimage_urls は自動変換されません。

課金項目2K768P
出力動画$0.13 / 秒$0.08 / 秒
参照動画入力$0.13 / 秒$0.08 / 秒
入力画像最初の 5 枚は無料、6 枚目から $0.04 / 枚最初の 5 枚は無料、6 枚目から $0.04 / 枚
入力音声無料無料

成功したタスクは実使用量で精算されます。参照動画入力には要求した出力解像度の秒単価が適用されます。

タスクを作成

{
  "model": "minimax-h3",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "A paper boat drifts through a rainy street at night"
      }
    ],
    "duration_seconds": 6,
    "resolution": "2K",
    "aspect_ratio": "16:9"
  }
}

トップレベル項目

項目必須説明
modelstringはいminimax-h3 固定
callback_urlstringいいえ終了状態を受け取る HTTPS URL。最大 2048 文字。ローカル・プライベートネットワークは禁止
inputobjectはい動画生成パラメーター

input 項目

項目必須説明
contentobject arrayはい空でない明示入力。空でないテキストを 1 つ以上含む
resolutionstringはい2K または 768P
duration_secondsintegerはい415 の整数
aspect_ratiostring条件付きテキストのみの場合は必須

ビットレート、フレームレート、動画・音声コーデックはプラットフォームが決定し、設定できません。 リクエストボディ全体は 64 MB 以下である必要があります。

アスペクト比の規則

入力モード規則
テキストのみ必須。adaptive は使用不可。6 種類の固定比率を使用
先頭フレームまたは先頭・末尾フレーム出力は常に入力画像の比率に従い、指定した aspect_ratio は無視されます
マルチモーダル参照省略可能。固定比率は指定どおり適用され、省略または adaptive で参照素材に従います

input.content

タイプrole上限説明
textなし空でないテキストを 1 つ以上。各テキスト項目は最大 7000 文字
image_urlfirst_frame1開始画面。画像が 1 枚のみで role を省略した場合も先頭フレーム扱い
image_urllast_frame1終了画面
image_urlreference_image9被写体・スタイル参照
video_urlreference_video3動き・カメラ参照
audio_urlreference_audio3音声参照

URL は image_url.urlvideo_url.urlaudio_url.url に配置します。動画は reference_video、音声は reference_audio を必ず使用します。

先頭・末尾フレーム入力と reference_imagereference_videoreference_audio は同じリクエストで併用できません。

対応モード:

  • テキスト動画生成: text
  • 先頭フレーム動画生成: text + first_frame
  • 先頭・末尾フレーム: text + first_frame + last_frame
  • マルチモーダル参照: text + 1 つ以上の reference_*

複数素材は配列順に Image 1Image 2Video 1Audio 1 としてプロンプトで参照します。Seedance 形式の @ 参照は使用しません。

入力素材の要件

入力形式サイズその他の制約
画像JPG、JPEG、PNG、WEBP、HEIC、HEIF各 30 MB 以下各辺 256〜5760 px、縦横比 0.4〜2.5
参照動画MP4、MOV各 50 MB 以下幅・高さ 256〜5760 px、縦横比 0.4〜2.5、H.264/H.265、AAC/MP3、各 2〜15 秒、合計 15 秒以下、23.976〜60 fps
参照音声WAV、MP3各 15 MB 以下各 2〜15 秒、合計 15 秒以下

素材 URL は上流サービスから取得可能である必要があります。Base64、data: URI、mm_file:// ハンドルは使用できません。

リクエスト例

先頭フレーム

{
  "model": "minimax-h3",
  "input": {
    "content": [
      { "type": "text", "text": "The camera slowly pulls back" },
      {
        "type": "image_url",
        "role": "first_frame",
        "image_url": { "url": "https://cdn.example.com/start.jpg" }
      }
    ],
    "duration_seconds": 5,
    "resolution": "2K"
  }
}

先頭・末尾フレーム

{
  "model": "minimax-h3",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "A smooth transition from close-up to wide shot"
      },
      {
        "type": "image_url",
        "role": "first_frame",
        "image_url": { "url": "https://cdn.example.com/start.jpg" }
      },
      {
        "type": "image_url",
        "role": "last_frame",
        "image_url": { "url": "https://cdn.example.com/end.jpg" }
      }
    ],
    "duration_seconds": 5,
    "resolution": "768P",
    "aspect_ratio": "adaptive"
  }
}

マルチモーダル参照

{
  "model": "minimax-h3",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "Replace the person in Video 1 with Image 1 and synchronize the action to Audio 1"
      },
      {
        "type": "image_url",
        "role": "reference_image",
        "image_url": { "url": "https://cdn.example.com/person.png" }
      },
      {
        "type": "video_url",
        "role": "reference_video",
        "video_url": { "url": "https://cdn.example.com/motion.mp4" }
      },
      {
        "type": "audio_url",
        "role": "reference_audio",
        "audio_url": { "url": "https://cdn.example.com/beat.mp3" }
      }
    ],
    "duration_seconds": 5,
    "resolution": "2K"
  }
}

レスポンスとポーリング

作成レスポンス:

{
  "code": 200,
  "msg": "",
  "status": "queued",
  "task_id": "task_xxx",
  "data": []
}

GET /v1/tasks/task_xxxstatussuccess または failed になるまでポーリングします。

{
  "code": 200,
  "status": "success",
  "task_id": "task_xxx",
  "data": [{ "url": "https://cdn.example.com/generated/video-1.mp4" }],
  "cost": { "spend": 0.52 },
  "billing": [
    {
      "metric": "VIDEO_SECONDS",
      "quantity": 4,
      "unit": 1,
      "price": 130000,
      "amount": 520000,
      "conditions": { "resolution": "2K" }
    }
  ]
}

cost.spend は USD 表示、billing は credits の課金明細です。結果 URL には有効期限があるため、速やかに保存してください。5 秒 / 2K のテキスト動画生成には通常約 3 分かかります。

エラー

ステータス説明
400必須・列挙項目の誤り、モード競合、素材上限超過
401API キーが無効
402credits 不足
422コンテンツ安全性による拒否
429レート制限。バックオフして再試行
500 / 502モデルまたは上流サービスが一時的に利用不可

失敗時は status: "failed"error_code が返り、課金されない場合の cost.spend0 です。

On this page