Skip to main content
POST
Crea un video Flux 3 da testo, immagini di riferimento oppure fotogrammi iniziale e finale. Memorizza il valore 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 campo input_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

Invia first_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 esplicitamente seconds su un numero intero da 5 a 20. Imposta size su uno di questi valori preimpostati WxH esatti: Il valore delle dimensioni seleziona il livello di risoluzione dell’output. Per la conversione da testo a video, le dimensioni codificate possono essere adattate per l’allineamento del codec. Per la conversione da immagine a video, l’immagine di riferimento può anche determinare l’inquadratura finale e il rapporto d’aspetto.

Flusso dell’attività

1

Crea l'attività

Invia la richiesta del modulo multipart e memorizza il valore id restituito.
2

Interroga l'attività

Chiama Recupera un video Flux 3 finché status non è completed o failed.
3

Scarica il risultato

Quando l’attività è completed, chiama Scarica il contenuto video Flux 3 per salvare il file MP4.

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer authentication. Use your CometAPI API key.

Corpo

multipart/form-data

Flux 3 multipart request. Choose text, input_reference URLs, or first_frame and last_frame inputs. Keep reference-image and frame inputs separate.

model
string
predefinito:flux-3
obbligatorio

Model ID for this route. Use flux-3.

Allowed value: "flux-3"
prompt
string
predefinito:A paper boat glides across a still pond while the camera moves forward.
obbligatorio

Text that describes the scene, motion, camera behavior, and visual details that the video should preserve.

Minimum string length: 1
seconds
integer

Requested clip duration in whole seconds. Set seconds explicitly to an integer from 5 through 20.

Intervallo richiesto: 5 <= x <= 20
size
enum<string>
predefinito:1280x720

Resolution 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.

Opzioni disponibili:
1280x720,
1920x1080
input_reference

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.

Pattern: ^https://
first_frame

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.

Pattern: ^https://
last_frame

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.

Pattern: ^https://

Risposta

Task created. Store the returned id and poll GET /v1/videos/{task_id}.

id
string
obbligatorio

Task ID. Use this value as task_id in retrieve and content requests.

Esempio:

"<task_id>"

object
string
obbligatorio

Object type for the asynchronous video task.

Allowed value: "video"
model
string
obbligatorio

Model ID that the task uses.

Allowed value: "flux-3"
status
enum<string>
obbligatorio

Task lifecycle status. Poll until the value is completed or failed.

Opzioni disponibili:
queued,
in_progress,
completed,
failed
progress
integer
obbligatorio

Task progress as a coarse percentage.

Intervallo richiesto: 0 <= x <= 100
created_at
integer<int64>
obbligatorio

Task creation time as a Unix timestamp in seconds.

task_id
string

Compatibility alias for id. This field can be omitted from retrieve responses.

Esempio:

"<task_id>"

completed_at
integer<int64>

Task completion time as a Unix timestamp in seconds when the task provides one.

expires_at
integer<int64>

Result expiration time as a Unix timestamp in seconds when the task provides one.

video_url
string<uri>

Video delivery URL. This field appears on completed tasks.

Esempio:

"https://media.example.com/flux-3-result.mp4"

error
object

Failure details. This field appears when the task fails.

Ultima modifica il 9 settembre 2026