Een MiniMax H3-video maken
Maak via CometAPI een MiniMax H3- of H3-Max-videotaak met tekst, referentiemedia of eerste en laatste frames
curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=minimax-h3' \
--form-string 'prompt=A paper boat glides across a still pond, daylight, locked camera, no text.' \
--form-string 'seconds=5' \
--form-string 'size=2544x1456'{
"id": "<task_id>",
"task_id": "<task_id>",
"object": "video",
"model": "minimax-h3",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}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.
| Model-ID | Resolutieniveaus |
|---|---|
minimax-h3 | 768P, 2K |
minimax-h3-max | 480P, 768P |
Een invoermodus kiezen
Beide modellen gebruiken de onderstaande velden. Stelmodel in op de model-ID die je hebt geselecteerd.
| Doel | Vereiste velden | Optionele velden |
|---|---|---|
| Tekst-naar-video | model, prompt | seconds, size |
| Referentieafbeeldingen | model, prompt, een of meer input_reference-URL’s of bestanden | seconds, size |
| Referentievideo-URL, data-URI of bestand | model, prompt, een of meer reference_videos-velden | seconds, size |
| Referentieaudio met een afbeelding | model, prompt, input_reference, een of meer reference_audios-velden | seconds, size |
| URL’s voor eerste en laatste frames | model, prompt, first_frame | last_frame, seconds, size |
| Geüploade eerste en laatste frames | model, prompt, first_frame bestand | last_frame bestand, seconds, size |
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.
| Veld | Invoer | Indeling |
|---|---|---|
reference_videos | Een rechtstreeks toegankelijke openbare HTTPS-MP4-URL of een geüpload MP4-bestand | MP4 met H.264-video; een AAC-audiotrack is optioneel |
reference_videos | Een volledige Base64-data-URI in een tekstveld | data:video/mp4;base64,<BASE64_MP4> |
reference_audios | Een rechtstreeks toegankelijke openbare HTTPS-MP3-URL of een geüpload MP3-bestand | MP3 |
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:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=minimax-h3' \
--form-string 'prompt=Follow the uploaded reference video shot structure and motion. No text.' \
--form-string 'seconds=5' \
--form-string 'size=1344x768' \
--form 'reference_videos=@/path/to/reference.mp4;type=video/mp4'
Referentieaudio met een afbeelding uploaden
Koppel een URL van een referentieafbeelding aan een geüpload MP3-bestand:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=minimax-h3' \
--form-string 'prompt=Animate the reference image and synchronize the motion with the uploaded reference audio. No text.' \
--form-string 'seconds=5' \
--form-string 'size=1344x768' \
--form-string 'input_reference=https://your-image-host/reference.png' \
--form 'reference_audios=@/path/to/reference.mp3;type=audio/mpeg'
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:
| Resolutie | Beeldverhouding | Aanvraaggrootte |
|---|---|---|
768P | 21:9 | 1536x672 |
768P | 16:9 | 1344x768 |
768P | 4:3 | 1024x768 |
768P | 1:1 | 768x768 |
768P | 3:4 | 768x1024 |
768P | 9:16 | 768x1344 |
2K | 21:9 | 2912x1280 |
2K | 16:9 | 2544x1456 |
2K | 4:3 | 1920x1440 |
2K | 1:1 | 1440x1440 |
2K | 3:4 | 1440x1920 |
2K | 9:16 | 1440x2560 |
Groottes voor minimax-h3-max
Gebruik deze aanvraaggroottes met model=minimax-h3-max:
| Resolutie | Beeldverhouding | Aanvraaggrootte |
|---|---|---|
480P | 21:9 | 1120x480 |
480P | 16:9 | 864x480 |
480P | 4:3 | 640x480 |
480P | 1:1 | 480x480 |
480P | 3:4 | 480x640 |
480P | 9:16 | 480x864 |
768P | 21:9 | 1792x768 |
768P | 16:9 | 1360x768 |
768P | 4:3 | 1024x768 |
768P | 1:1 | 768x768 |
768P | 3:4 | 768x1024 |
768P | 9:16 | 768x1360 |
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.Body
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.
^[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.
curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=minimax-h3' \
--form-string 'prompt=A paper boat glides across a still pond, daylight, locked camera, no text.' \
--form-string 'seconds=5' \
--form-string 'size=2544x1456'{
"id": "<task_id>",
"task_id": "<task_id>",
"object": "video",
"model": "minimax-h3",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}