Crea un video MiniMax H3
Crea un’attività video MiniMax H3 o H3-Max con testo, contenuti multimediali di riferimento oppure primo e ultimo fotogramma tramite CometAPI
id restituito per controllare l’attività e scaricare il video completato.
POST /v1/videos utilizza multipart/form-data. Invia i controlli come campi del modulo e ripeti ciascun campo di riferimento una volta per ogni input multimediale.
Scegli un modello
Impostamodel su uno dei seguenti ID modello. Scegli una dimensione della richiesta dalla tabella del modello corrispondente in Imposta durata e dimensione.
Scegli una modalità di input
Entrambi i modelli utilizzano i campi seguenti. Impostamodel sull’ID del modello selezionato.
Usa immagini di riferimento
Invia immagini di riferimento tramiteinput_reference come URL HTTPS accessibili pubblicamente o file caricati. Per più immagini, ripeti il campo nell’ordine delle immagini, con un URL o file per campo.
Utilizza tutti gli URL o tutti i file in questo campo. Invia ogni URL separatamente anziché combinare gli URL in un valore separato da virgole.
Puoi inviare fino a nove immagini di riferimento PNG o JPEG, sia tramite URL sia tramite file caricati. Mantieni ogni immagine caricata a 20 MiB o meno.
Nel prompt, descrivi i dettagli visivi che il video generato deve preservare.
Utilizzare video e audio di riferimento
Inviareference_videos e reference_audios come valori di testo multipart o file caricati, utilizzando i formati indicati di seguito.
Ripeti ogni campo una volta per input, utilizzando solo valori di testo o solo file all’interno di quel campo. Non combinare gli input in un valore separato da virgole.
Campi diversi possono utilizzare tipi di input diversi, ad esempio un URL di immagine con un file audio caricato.
Per combinare riferimenti di immagini, video e audio, invia input_reference, reference_videos e reference_audios nella stessa richiesta.
input_reference.
Descrivi il movimento, la tempistica o il suono che il video generato deve seguire.
Mantieni ogni MP4 caricato a un massimo di 50 MiB e ogni MP3 caricato a un massimo di 15 MiB. Un MiB corrisponde a 1024 × 1024 byte.
Gli esempi di richieste nella parte superiore di questa pagina mostrano URL MP4, URI dati MP4 e URL MP3 abbinati a un’immagine.
Caricare un video di riferimento
Carica un file MP4 per guidare la struttura dell’inquadratura e il movimento:Caricare audio di riferimento con un’immagine
Abbina un URL di immagine di riferimento a un file MP3 caricato:Impostare il primo e l’ultimo fotogramma
Inviafirst_frame per l’immagine iniziale e, facoltativamente, un last_frame per l’immagine finale.
Ogni campo accetta un URL PNG HTTPS diretto e pubblicamente accessibile oppure un file PNG caricato. Mantieni ogni PNG caricato a un massimo di 20 MiB (20 × 1024 × 1024 byte).
Non combinare i campi dei fotogrammi con i campi di immagini, video o audio di riferimento. Utilizza una richiesta separata per la generazione basata sui fotogrammi.
Con gli input dei fotogrammi, size seleziona il livello di risoluzione. Il servizio può normalizzare le dimensioni finali dell’output in base ai fotogrammi forniti.
Continua a inviare size nel formato WxH.
id. Esegui il polling dell’attività finché status non è completed oppure
failed. Al completamento dell’attività, scarica il contenuto video.Imposta durata e dimensioni
Per entrambi i modelli, impostaseconds su un numero intero da 5 a 15. Il valore predefinito è 5 secondi.
Scegli una risoluzione e un rapporto d’aspetto dalla tabella per il tuo modello, quindi invia il valore corrispondente Dimensione della richiesta come size nel formato WxH.
Per le richieste di testo e contenuti multimediali di riferimento, size seleziona il livello di risoluzione e il rapporto d’aspetto dell’inquadratura.
Il servizio può normalizzare le dimensioni dell’output finale in base alla dimensione richiesta e ai contenuti multimediali di riferimento forniti.
Dimensioni per minimax-h3
Usa queste dimensioni della richiesta con model=minimax-h3:
Dimensioni per minimax-h3-max
Usa queste dimensioni della richiesta con model=minimax-h3-max:
Flusso dell’attività
Crea l'attività
id restituito.Verifica periodicamente l'attività
status non è completed o failed.Scarica il risultato
completed, chiama l’endpoint per scaricare il contenuto video MiniMax H3 per salvare il file MP4.Autorizzazioni
Bearer authentication. Use your CometAPI API key.
Corpo
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"
Risposta
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.