Een MiniMax H3-video maken
Maak via CometAPI een MiniMax H3- of H3-Max-videotaak met tekst, referentiemedia of eerste en laatste frames
id op om de taak te pollen en de voltooide video te downloaden.
POST /v1/videos gebruikt multipart/form-data. Verzend opties als formuliervelden en herhaal elk referentieveld eenmaal per media-invoer.
Een model kiezen
Stelmodel in op een van de volgende model-ID’s. Kies een aanvraaggrootte uit de tabel voor het overeenkomende model in Duur en grootte instellen.
Een invoermodus kiezen
Beide modellen gebruiken de onderstaande velden. Stelmodel in op de model-ID die je hebt geselecteerd.
Referentieafbeeldingen gebruiken
Verzend referentieafbeeldingen viainput_reference als openbaar toegankelijke HTTPS-URL’s of geüploade bestanden. Herhaal het veld voor meerdere afbeeldingen in afbeeldingsvolgorde, met één URL of bestand per veld.
Gebruik binnen dit veld uitsluitend URL’s of uitsluitend bestanden. Verzend elke URL afzonderlijk in plaats van URL’s te combineren in een door komma’s gescheiden waarde.
Je kunt maximaal negen PNG- of JPEG-referentieafbeeldingen verzenden, ongeacht of je URL’s of geüploade bestanden gebruikt. Houd elke geüploade afbeelding op of onder 20 MiB.
Beschrijf in de prompt welke visuele details de gegenereerde video moet behouden.
Referentievideo en -audio gebruiken
Verstuurreference_videos en reference_audios als multipart-tekstwaarden of geüploade bestanden, met de onderstaande indelingen.
Herhaal elk veld één keer per invoer en gebruik binnen dat veld uitsluitend tekstwaarden of uitsluitend bestanden. Combineer invoer niet tot een door komma’s gescheiden waarde.
Verschillende velden kunnen verschillende invoertypen gebruiken, zoals een afbeeldings-URL met een geüpload audiobestand.
Als je afbeeldings-, video- en audioreferenties wilt combineren, verstuur je input_reference, reference_videos en reference_audios in dezelfde aanvraag.
input_reference.
Beschrijf de beweging, timing of het geluid dat de gegenereerde video moet volgen.
Houd elk geüpload MP4-bestand op maximaal 50 MiB en elk geüpload MP3-bestand op maximaal 15 MiB. Eén MiB is 1024 × 1024 bytes.
De aanvraagvoorbeelden bovenaan deze pagina tonen MP4-URL’s, MP4-data-URI’s en MP3-URL’s die met een afbeelding zijn gekoppeld.
Een referentievideo uploaden
Upload een MP4-bestand om de opnameopbouw en beweging te sturen:Referentieaudio met een afbeelding uploaden
Koppel een URL van een referentieafbeelding aan een geüpload MP3-bestand:Het eerste en laatste frame instellen
Verstuurfirst_frame voor de beginafbeelding en optioneel één last_frame voor de eindafbeelding.
Elk veld accepteert één rechtstreeks toegankelijke openbare HTTPS-PNG-URL of één geüpload PNG-bestand. Houd elk geüpload PNG-bestand op maximaal 20 MiB (20 × 1024 × 1024 bytes).
Combineer framevelden niet met referentievelden voor afbeeldingen, video of audio. Gebruik een afzonderlijke aanvraag voor generatie op basis van frames.
Met frame-invoer selecteert size het resolutieniveau. De service kan de uiteindelijke uitvoerafmetingen normaliseren op basis van de opgegeven frames.
Blijf size in de vorm WxH versturen.
id op. Poll de taak totdat status completed is of
failed. Wanneer de taak is voltooid, download je de video-inhoud.Duur en grootte instellen
Stel voor beide modellenseconds in op een geheel getal van 5 tot en met 15. De standaardwaarde is 5 seconden.
Kies een resolutie en beeldverhouding uit de tabel voor uw model en stuur vervolgens de bijbehorende Aanvraaggrootte waarde als size in de vorm WxH.
Voor tekst- en referentiemedia-aanvragen selecteert size het resolutieniveau en de beeldverhouding van de kadrering.
De service kan de uiteindelijke uitvoerafmetingen normaliseren op basis van de aangevraagde grootte en de aangeleverde referentiemedia.
Groottes voor minimax-h3
Gebruik deze aanvraaggroottes met model=minimax-h3:
Groottes voor minimax-h3-max
Gebruik deze aanvraaggroottes met model=minimax-h3-max:
Taakstroom
De taak maken
id op.De taak pollen
status completed of failed is.Het resultaat downloaden
completed is, roep MiniMax H3-video-inhoud downloaden aan om het MP4-bestand op te slaan.Autorisaties
Bearer authentication. Use your CometAPI API key.
Body
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"
Respons
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.