MiniMax H3 動画を作成する
CometAPI を使用して、テキスト、参照メディア、または最初と最後のフレームから MiniMax H3 または H3-Max の動画タスクを作成する
id を保存して、タスクをポーリングし、完成した動画をダウンロードします。
POST /v1/videos では multipart/form-data を使用します。コントロールはフォームフィールドとして送信し、参照フィールドはメディア入力ごとに1回ずつ繰り返します。
モデルを選択する
model には、次のモデル ID のいずれかを設定します。リクエストサイズは、 期間とサイズを設定する.
入力モードを選択する
どちらのモデルも以下のフィールドを使用します。model には、選択したモデル ID を設定します。
参照画像を使用する
参照画像は、input_reference を使用して、公開アクセス可能な HTTPS URL またはアップロードしたファイルとして送信します。複数の画像を送信する場合は、画像の順序に従ってフィールドを繰り返し、各フィールドに URL またはファイルを1つずつ指定します。
このフィールド内では、すべて URL またはすべてファイルを使用します。URL をカンマ区切りの値にまとめず、各 URL を個別に送信します。
URL とアップロードしたファイルのどちらを使用する場合でも、PNG または JPEG の参照画像を最大9枚送信できます。アップロードする各画像は 20 MiB 以下にしてください。
プロンプトには、生成される動画で保持する必要がある視覚的な詳細を記述します。
参照用動画と音声を使用する
以下の形式で、reference_videos と reference_audios をマルチパートのテキスト値またはアップロードしたファイルとして送信します。
入力ごとに各フィールドを1回繰り返し、そのフィールド内ではテキスト値のみ、またはファイルのみを使用します。入力をカンマ区切りの値にまとめないでください。
画像 URL とアップロードした音声ファイルのように、フィールドごとに異なる入力タイプを使用できます。
画像、動画、音声の参照を組み合わせるには、同じリクエストで input_reference、reference_videos、reference_audios を送信します。
input_reference を介して、参照音声を少なくとも1枚の画像と組み合わせます。
生成する動画が従うべき動き、タイミング、または音を説明します。
アップロードする各 MP4 は50 MiB以下、各 MP3 は15 MiB以下にしてください。1 MiB は1024 × 1024バイトです。
このページ上部のリクエストサンプルでは、画像と組み合わせた MP4 URL、MP4 データ URI、MP3 URL を示しています。
参照用動画をアップロードする
ショット構成と動きを指定するために MP4 ファイルをアップロードします。画像とともに参照音声をアップロードする
参照画像 URL とアップロードした MP3 ファイルを組み合わせます。最初と最後のフレームを設定する
開始画像にはfirst_frame を送信し、終了画像には任意で last_frame を1つ送信します。
各フィールドには、直接アクセス可能な公開 HTTPS PNG URL を1つ、またはアップロードした PNG ファイルを1つ指定できます。アップロードする各 PNG は20 MiB以下にしてください(20 × 1024 × 1024バイト).
フレームフィールドを参照画像、動画、音声のフィールドと組み合わせないでください。フレームベースの生成には別のリクエストを使用します。
フレーム入力では、size が解像度階層を選択します。サービスは、指定されたフレームに基づいて最終出力の寸法を正規化できます。
引き続き size を WxH 形式で送信します。
id を保存します。status が completed または
failed。タスクが完了したら、動画コンテンツをダウンロードします。期間とサイズを設定
両方のモデルで、seconds を 5 から 15 までの整数に設定します。デフォルトは 5 秒です。
モデルに対応する解像度とアスペクト比を表から選択し、対応する リクエストサイズ の値を size として WxH 形式で送信します。
テキストおよび参照メディアのリクエストでは、size で解像度ティアとフレーミングのアスペクト比を選択します。
サービスは、リクエストしたサイズと指定された参照メディアに基づいて、最終出力の寸法を正規化できます。
minimax-h3 のサイズ
model=minimax-h3 では、次のリクエストサイズを使用します。
minimax-h3-max のサイズ
model=minimax-h3-max では、次のリクエストサイズを使用します。
タスクフロー
タスクを作成
id を保存します。タスクをポーリング
status が completed または failed になるまで繰り返します。結果をダウンロード
completed になったら、 MiniMax H3 ビデオコンテンツをダウンロード を呼び出して MP4 ファイルを保存します。承認
Bearer authentication. Use your CometAPI API key.
ボディ
Model ID for the video task. Use minimax-h3 for 768P or 2K, or minimax-h3-max for 480P or 768P. Choose size from the matching model table.
minimax-h3, minimax-h3-max Text that describes the scene, motion, camera behavior, and visual details that the video should preserve.
1Requested clip duration in whole seconds. Use an integer from 5 through 15. The default is 5.
5 <= x <= 15Requested size in WxH form. For text and reference-media requests, size selects the resolution tier and framing aspect ratio. With first or last frames, size selects the resolution tier. Use the matching model table: minimax-h3 uses 768P or 2K; minimax-h3-max uses 480P or 768P. For example, use 1344x768 for H3 at 768P, 864x480 for H3-Max at 480P, or 1360x768 for H3-Max at 768P. The service can normalize the final output dimensions.
^[1-9][0-9]*x[1-9][0-9]*$"1536x672"
"1344x768"
"1024x768"
"768x768"
"768x1024"
"768x1344"
"2912x1280"
"2544x1456"
"1920x1440"
"1440x1440"
"1440x1920"
"1440x2560"
"1120x480"
"864x480"
"640x480"
"480x480"
"480x640"
"480x864"
"1792x768"
"1360x768"
"768x1360"
PNG or JPEG reference images. Repeat input_reference with one publicly accessible HTTPS image URL or uploaded image file per field. Send up to nine reference images, whether you use URLs or uploaded files. Use all URLs or all files within this field. Do not combine URLs into a comma-separated value. Keep each uploaded image at or below 20 MiB. Do not combine this field with first_frame or last_frame. Across images, videos, and audio, send at most 12 reference inputs. Each reference video or audio clip must be 2–15 seconds; keep the combined video duration and combined audio duration at or below 15 seconds each. Submit images in the order you want to reference them in the prompt.
^https://Reference video inputs. Repeat reference_videos with a direct publicly accessible HTTPS MP4 URL or an uploaded MP4 file. Use only text values or only files within this field. Each uploaded file can be up to 50 MiB. Send no more than three video inputs. A complete data:video/mp4;base64,... URI is also accepted as a text value. Use MP4 with H.264 video; an AAC audio track is optional. Do not combine this field with first_frame or last_frame. Across images, videos, and audio, send at most 12 reference inputs. Each reference video or audio clip must be 2–15 seconds; keep the combined video duration and combined audio duration at or below 15 seconds each.
1 - 3 elements^(https://|data:video/mp4;base64,)"https://your-media-host/reference.mp4"
Reference audio inputs. Repeat reference_audios with a direct publicly accessible HTTPS MP3 URL or an uploaded MP3 file. Use only text values or only files within this field. Each uploaded file can be up to 15 MiB. Send no more than three audio inputs. Pair reference audio with at least one reference image. Do not combine this field with first_frame or last_frame. Across images, videos, and audio, send at most 12 reference inputs. Each reference video or audio clip must be 2–15 seconds; keep the combined video duration and combined audio duration at or below 15 seconds each.
1 - 3 elements^https://"https://your-media-host/reference.mp3"
Opening frame input as one direct publicly accessible HTTPS PNG URL or one uploaded PNG file at or below 20 MiB (20 x 1024 x 1024 bytes). Do not combine frame fields with reference media fields.
^https://"https://your-image-host/first-frame.png"
Optional ending frame input, used with first_frame, as one direct publicly accessible HTTPS PNG URL or one uploaded PNG file at or below 20 MiB (20 x 1024 x 1024 bytes). Do not combine frame fields with reference media fields.
^https://"https://your-image-host/last-frame.png"
レスポンス
Task created. Store the returned id and use it in retrieve and content requests.
Task ID. Use this value as task_id in retrieve and content requests.
"<task_id>"
Object type for the asynchronous video task.
"video"Model ID that the task uses.
minimax-h3, minimax-h3-max Task lifecycle status. Poll until the value is completed or failed.
queued, in_progress, completed, failed Task progress as a coarse percentage.
0 <= x <= 100Task creation time as a Unix timestamp in seconds.
Compatibility alias for id. This field can be omitted from retrieve responses.
"<task_id>"
Unix timestamp returned by the platform. Use status, not this field, to decide when polling can stop.
Result expiration time as a Unix timestamp in seconds when the task provides one.
Video delivery URL. This field appears on completed tasks.
"https://your-media-host/result.mp4"
Failure details. This field appears when the task fails.