Tạo video MiniMax H3
Tạo tác vụ video MiniMax H3 hoặc H3-Max bằng văn bản, media tham chiếu hoặc khung hình đầu và cuối thông qua CometAPI
id được trả về để kiểm tra tác vụ và tải xuống video đã hoàn tất.
POST /v1/videos sử dụng multipart/form-data. Gửi các tùy chọn điều khiển dưới dạng trường biểu mẫu và lặp lại từng trường tham chiếu một lần cho mỗi đầu vào media.
Chọn một model
Đặtmodel thành một trong các ID model sau. Chọn kích thước request từ bảng model tương ứng trong Thiết lập thời lượng và kích thước.
Chọn chế độ đầu vào
Cả hai model đều sử dụng các trường bên dưới. Đặtmodel thành ID model mà bạn đã chọn.
Sử dụng hình ảnh tham chiếu
Gửi hình ảnh tham chiếu quainput_reference dưới dạng URL HTTPS có thể truy cập công khai hoặc tệp đã tải lên. Với nhiều hình ảnh, hãy lặp lại trường theo thứ tự hình ảnh, với một URL hoặc tệp cho mỗi trường.
Chỉ dùng toàn bộ URL hoặc toàn bộ tệp trong trường này. Gửi riêng từng URL thay vì kết hợp các URL thành một giá trị được phân tách bằng dấu phẩy.
Bạn có thể gửi tối đa chín hình ảnh tham chiếu PNG hoặc JPEG, dù dùng URL hay tệp đã tải lên. Giữ mỗi hình ảnh đã tải lên ở mức 20 MiB hoặc thấp hơn.
Trong Prompt, hãy mô tả các chi tiết trực quan mà video được tạo cần giữ lại.
Sử dụng video và audio tham chiếu
Gửireference_videos và reference_audios dưới dạng giá trị văn bản multipart hoặc tệp đã tải lên, bằng các định dạng bên dưới.
Lặp lại mỗi trường một lần cho mỗi đầu vào, chỉ sử dụng giá trị văn bản hoặc chỉ tệp trong trường đó. Không kết hợp các đầu vào thành một giá trị phân tách bằng dấu phẩy.
Các trường khác nhau có thể dùng các loại đầu vào khác nhau, chẳng hạn như URL hình ảnh cùng với tệp audio đã tải lên.
Để kết hợp các tham chiếu hình ảnh, video và audio, hãy gửi input_reference, reference_videos và reference_audios trong cùng một yêu cầu.
input_reference.
Mô tả chuyển động, thời điểm hoặc âm thanh mà video được tạo cần tuân theo.
Giữ mỗi MP4 đã tải lên ở mức không quá 50 MiB và mỗi MP3 đã tải lên ở mức không quá 15 MiB. Một MiB là 1024 × 1024 byte.
Các mẫu yêu cầu ở đầu trang này hiển thị URL MP4, URI dữ liệu MP4 và URL MP3 được ghép với một hình ảnh.
Tải video tham chiếu lên
Tải tệp MP4 lên để định hướng cấu trúc cảnh quay và chuyển động:Tải audio tham chiếu lên cùng với một hình ảnh
Ghép URL hình ảnh tham chiếu với tệp MP3 đã tải lên:Đặt khung hình đầu tiên và cuối cùng
Gửifirst_frame cho hình ảnh mở đầu và tùy chọn một last_frame cho hình ảnh kết thúc.
Mỗi trường chấp nhận một URL PNG HTTPS trực tiếp, có thể truy cập công khai hoặc một tệp PNG đã tải lên. Giữ mỗi PNG đã tải lên ở mức không quá 20 MiB (20 × 1024 × 1024 byte).
Không kết hợp các trường khung hình với các trường hình ảnh, video hoặc audio tham chiếu. Hãy dùng một yêu cầu riêng để tạo nội dung dựa trên khung hình.
Với đầu vào khung hình, size chọn cấp độ độ phân giải. Dịch vụ có thể chuẩn hóa kích thước đầu ra cuối cùng dựa trên các khung hình được cung cấp.
Tiếp tục gửi size ở dạng WxH.
id được trả về. Thăm dò tác vụ cho đến khi status là completed hoặc
failed. Khi tác vụ hoàn tất, hãy tải xuống nội dung video.Thiết lập thời lượng và kích thước
Đối với cả hai model, hãy đặtseconds thành một số nguyên từ 5 đến 15. Giá trị mặc định là 5 giây.
Chọn độ phân giải và tỷ lệ khung hình từ bảng dành cho model của bạn, sau đó gửi giá trị tương ứng Kích thước yêu cầu dưới dạng size theo định dạng WxH.
Đối với các yêu cầu văn bản và phương tiện tham chiếu, size chọn cấp độ phân giải và tỷ lệ khung hình.
Dịch vụ có thể chuẩn hóa kích thước đầu ra cuối cùng dựa trên kích thước được yêu cầu và phương tiện tham chiếu được cung cấp.
Kích thước cho minimax-h3
Sử dụng các kích thước yêu cầu này với model=minimax-h3:
Kích thước cho minimax-h3-max
Sử dụng các kích thước yêu cầu này với model=minimax-h3-max:
Luồng tác vụ
Tạo tác vụ
id được trả về.Thăm dò tác vụ
status là completed hoặc failed.Tải xuống kết quả
completed, hãy gọi Tải xuống nội dung video MiniMax H3 để lưu tệp MP4.Ủy quyền
Bearer authentication. Use your CometAPI API key.
Nội dung
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"
Phản hồi
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.