跳轉到主要內容
POST
使用文字、參考媒體或首尾影格建立 MiniMax H3 或 H3-Max 影片。儲存傳回的 id,以輪詢任務並下載完成的影片。 POST /v1/videos 使用 multipart/form-data。請將控制項作為表單欄位傳送,並針對每個媒體輸入重複傳送一次每個參考欄位。

選擇模型

將 model 設為下列其中一個模型 ID。請從相符模型表格中選擇請求尺寸,請參閱 設定時長和尺寸.

選擇輸入模式

兩個模型都使用以下欄位。將 model 設為您所選取的模型 ID。 H3-Max 請求範例包含兩個解析度等級的文字轉影片、參考圖片、結合圖片/影片/音訊的參考資料,以及首尾影格。

使用參考圖片

透過 input_reference 以可公開存取的 HTTPS URL 或上傳檔案傳送參考圖片。若要傳送多張圖片,請依圖片順序重複該欄位,每個欄位包含一個 URL 或檔案。 在此欄位中僅使用所有 URL 或所有檔案。請分別傳送每個 URL,不要將 URL 合併為以逗號分隔的值。 無論使用 URL 或上傳檔案,最多可傳送九張 PNG 或 JPEG 參考圖片。每張上傳圖片請維持在 20 MiB 以下。 在 Prompt 中,描述產生的影片應保留的視覺細節。

使用參考影片和音訊

以 multipart 文字值或上傳檔案的方式傳送 reference_videos 和 reference_audios,並使用下列格式。 每個欄位中的每項輸入各重複一次,且該欄位只能使用文字值或只能使用檔案。請勿將輸入合併為以逗號分隔的值。 不同欄位可使用不同輸入類型,例如圖片 URL 搭配上傳的音訊檔案。 若要合併圖片、影片和音訊參考資料,請在同一個請求中傳送 input_reference、reference_videos 和 reference_audios。 總共最多傳送 12 項參考輸入,其中影片不得超過三部,音訊片段不得超過三個。 每部影片或音訊片段必須為 2–15 秒。影片總時長和音訊總時長各自都必須不超過 15 秒。 透過 input_reference 將參考音訊與至少一張圖片配對。 描述產生的影片應遵循的動作、時間安排或聲音。 每個上傳的 MP4 必須不超過 50 MiB,每個上傳的 MP3 必須不超過 15 MiB。一個 MiB 為 1024 × 1024 位元組。 本頁頂端的請求範例顯示了搭配圖片的 MP4 URL、MP4 資料 URI 和 MP3 URL。

上傳參考影片

上傳 MP4 檔案以引導鏡頭結構和動作:

上傳搭配圖片的參考音訊

將參考圖片 URL 與上傳的 MP3 檔案配對:

設定首尾影格

為開頭圖片傳送 first_frame,並可選擇為結尾圖片傳送一個 last_frame。 每個欄位可接受一個可直接存取且公開可用的 HTTPS PNG URL,或一個上傳的 PNG 檔案。每個上傳的 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 使用以下請求大小:

任務流程

1

建立任務

傳送 multipart 表單請求,並儲存傳回的 id。
2

輪詢任務

呼叫 擷取 MiniMax H3 影片 ,直到 status 為 completed 或 failed。
3

下載結果

當任務為 completed 時,呼叫 下載 MiniMax H3 影片內容 以儲存 MP4 檔案。

授權

Authorization
string
header
必填

Bearer authentication. Use your CometAPI API key.

主體

multipart/form-data
model
enum<string>
預設值:minimax-h3
必填

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
prompt
string
預設值:A paper boat glides across a still pond, daylight, locked camera, no text.
必填

Text that describes the scene, motion, camera behavior, and visual details that the video should preserve.

Minimum string length: 1
seconds
integer
預設值:5

Requested clip duration in whole seconds. Use an integer from 5 through 15. The default is 5.

必填範圍: 5 <= x <= 15
size
string

Requested 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.

Pattern: ^[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"

input_reference

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.

Pattern: ^https://
reference_videos
(string<uri> | file)[]

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.

Required array length: 1 - 3 elements
Pattern: ^(https://|data:video/mp4;base64,)
範例:

"https://your-media-host/reference.mp4"

reference_audios
(string<uri> | file)[]

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.

Required array length: 1 - 3 elements
Pattern: ^https://
範例:

"https://your-media-host/reference.mp3"

first_frame
必填 if last_frame is set

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.

Pattern: ^https://
範例:

"https://your-image-host/first-frame.png"

last_frame

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.

Pattern: ^https://
範例:

"https://your-image-host/last-frame.png"

回應

200 - application/json

Task created. Store the returned id and use it in retrieve and content requests.

id
string
必填

Task ID. Use this value as task_id in retrieve and content requests.

範例:

"<task_id>"

object
string
必填

Object type for the asynchronous video task.

Allowed value: "video"
model
enum<string>
必填

Model ID that the task uses.

可用選項:
minimax-h3,
minimax-h3-max
status
enum<string>
必填

Task lifecycle status. Poll until the value is completed or failed.

可用選項:
queued,
in_progress,
completed,
failed
progress
integer
必填

Task progress as a coarse percentage.

必填範圍: 0 <= x <= 100
created_at
integer<int64>
必填

Task creation time as a Unix timestamp in seconds.

task_id
string

Compatibility alias for id. This field can be omitted from retrieve responses.

範例:

"<task_id>"

completed_at
integer<int64>

Unix timestamp returned by the platform. Use status, not this field, to decide when polling can stop.

expires_at
integer<int64>

Result expiration time as a Unix timestamp in seconds when the task provides one.

video_url
string<uri>

Video delivery URL. This field appears on completed tasks.

範例:

"https://your-media-host/result.mp4"

error
object

Failure details. This field appears when the task fails.

最後修改於 2026年9月14日