Crea un video Flux 3
Crea un video Flux 3 da testo, immagini di riferimento oppure fotogrammi iniziale e finale con una preimpostazione di dimensioni 720p o 1080p.
id restituito per interrogare l’attività e scaricare il video completato.
POST /v1/videos usa multipart/form-data. Invia i controlli come campi del modulo. Per gli input di immagini, usa URL di immagini di riferimento oppure fotogrammi iniziale e finale.
Mantieni input_reference separato da first_frame e last_frame.
Scegli una modalità di input
Usa immagini di riferimento
Il campoinput_reference accetta solo URL di immagini HTTPS accessibili pubblicamente. Invialo una volta per una singola immagine oppure ripetilo nell’ordine dei fotogrammi chiave per più immagini. Usa un URL per campo, fino a un massimo di 10 URL in totale.
Descrivi il movimento, il comportamento della videocamera e i dettagli visivi che il video generato deve preservare dall’immagine di riferimento.
Gli esempi di richiesta nella parte superiore di questa pagina mostrano input con una singola immagine e con più immagini. La richiesta seguente usa due immagini nell’ordine in cui sono state inviate:
Imposta il primo e l’ultimo fotogramma
Inviafirst_frame per impostare l’immagine iniziale. Per impostare anche l’immagine finale, includi last_frame e descrivi il movimento tra i due fotogrammi in prompt.
Per il solo fotogramma iniziale, ometti last_frame. Un fotogramma finale richiede sia first_frame sia last_frame.
Ogni campo accetta un URL HTTPS accessibile pubblicamente oppure un file PNG o JPEG. Invia ogni campo una volta, usando un URL o un file. Mantieni ogni file pari o inferiore a 20 MiB (20 × 1024 × 1024 byte).
Gli esempi dei fotogrammi nella parte superiore di questa pagina mostrano input URL e caricamenti di file, con seconds e size impostati esplicitamente.
Imposta durata e dimensioni
Imposta esplicitamenteseconds su un numero intero da 5 a 20.
Imposta size su uno di questi valori preimpostati WxH esatti:
Flusso dell’attività
Crea l'attività
id restituito.Interroga l'attività
status non è completed o failed.Scarica il risultato
completed, chiama Scarica il contenuto video Flux 3 per salvare il file MP4.Autorizzazioni
Bearer authentication. Use your CometAPI API key.
Corpo
Flux 3 multipart request. Choose text, input_reference URLs, or first_frame and last_frame inputs. Keep reference-image and frame inputs separate.
Model ID for this route. Use flux-3.
"flux-3"Text that describes the scene, motion, camera behavior, and visual details that the video should preserve.
1Requested clip duration in whole seconds. Set seconds explicitly to an integer from 5 through 20.
5 <= x <= 20Resolution preset in exact WxH form. Use 1280x720 for the 720p tier or 1920x1080 for the 1080p tier. Encoded dimensions can be codec-aligned; image-to-video framing can follow the reference image.
1280x720, 1920x1080 Reference image URLs. Send one publicly accessible HTTPS image URL per input_reference field. For multiple images, repeat the field in keyframe order, up to 10 URLs. This field accepts URLs only. Keep it separate from first_frame and last_frame.
^https://Opening-frame image as one publicly accessible HTTPS URL or one PNG or JPEG file. Keep each file at or below 20 MiB (20 × 1024 × 1024 bytes). Send the field once, using either a URL or a file. Pair with last_frame to set both boundaries. Keep frame inputs separate from input_reference.
^https://Closing-frame image as one publicly accessible HTTPS URL or one PNG or JPEG file. Keep each file at or below 20 MiB (20 × 1024 × 1024 bytes). Send the field once, using either a URL or a file. To specify the closing image through this endpoint, send last_frame together with first_frame. Keep frame inputs separate from input_reference.
^https://Risposta
Task created. Store the returned id and poll GET /v1/videos/{task_id}.
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.
"flux-3"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>"
Task completion time as a Unix timestamp in seconds when the task provides one.
Result expiration time as a Unix timestamp in seconds when the task provides one.
Video delivery URL. This field appears on completed tasks.
"https://media.example.com/flux-3-result.mp4"
Failure details. This field appears when the task fails.