Vai al contenuto principale
POST
Usa questo endpoint per creare un’attività video Vidu. I modelli Vidu Q3 creano attività text-to-video e image-to-video. viduq4-preview crea attività image-to-video e reference-to-video. L’API restituisce immediatamente un ID attività, quindi memorizza il valore id restituito ed esegui il polling dell’attività finché non raggiunge uno stato terminale. POST /v1/videos usa multipart/form-data. Invia i controlli scalari come campi del modulo e le immagini di riferimento come campi input_reference.

Scegli una modalità di input

viduq4-preview seleziona la modalità dalla richiesta. Un’immagine di riferimento senza audio di riferimento crea un’attività image-to-video. Due o più immagini di riferimento, oppure un’immagine di riferimento con reference_audios, creano un’attività reference-to-video. Per verificare che viduq3 o viduq3-turbo siano disponibili per la tua chiave API, usa Elenca i modelli disponibili.

Usa immagini di riferimento

Per image-to-video Q3, carica un’immagine di riferimento tramite il campo multipart input_reference. Il file può avere dimensioni fino a 20 MB. L’immagine guida la composizione e l’aspetto del video generato. Usa il prompt per descrivere il movimento, il comportamento della videocamera e i dettagli che il video deve preservare. Per viduq4-preview image-to-video, invia un’immagine come file caricato o come URL HTTPS pubblicamente accessibile in input_reference. Il video inizia da questa immagine e ne mantiene le proporzioni. Per viduq4-preview reference-to-video, invia 2–12 URL HTTPS di immagini pubblicamente accessibili. Ripeti input_reference una volta per immagine e invia ogni URL nel proprio campo. Usa immagini PNG, JPEG o WEBP. Nel prompt, fai riferimento alle immagini di riferimento in base al loro ordine nella richiesta: @1 è la prima immagine input_reference, @2 è la seconda e così via. Per esempio: The pink car from @1 drives across the snowy hill from @2.

Aggiungi audio di riferimento

Per viduq4-preview reference-to-video, reference_audios aggiunge riferimenti vocali. Invia fino a 3 URL HTTPS pubblicamente accessibili di clip MP3, ciascuna della durata di 3–12 secondi, e ripeti reference_audios una volta per clip. Invia almeno un’immagine input_reference nella stessa richiesta.

Impostare durata e dimensioni

Per i modelli Q3, imposta size su uno dei valori WxH seguenti. Per viduq4-preview, imposta size su uno dei valori WxH seguenti. Per reference-to-video, size imposta la forma del fotogramma. Per image-to-video, l’output mantiene il rapporto d’aspetto dell’immagine di input. viduq4-preview i video includono una traccia audio generata.

Flusso dell’attività

1

Crea l'attività

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

Controlla l'attività

Chiama Recuperare un video Vidu finché status non è completed, failed o error.
3

Scarica il risultato

Quando l’attività è completed, chiama Recuperare il contenuto di un video Vidu per scaricare il file MP4.

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer authentication. Use your CometAPI API key.

Corpo

multipart/form-data
model
string
obbligatorio

Vidu model ID for this route: viduq3 or viduq3-turbo for text-to-video and image-to-video, or viduq4-preview for image-to-video and reference-to-video. Choose an available model from the Models page.

Esempio:

"viduq3-turbo"

prompt
string
obbligatorio

Text prompt that describes the video to generate. For image-to-video, describe the motion and camera behavior that should animate the reference image. For viduq4-preview reference-to-video, refer to reference images as @1, @2, and so on, in the order of the input_reference fields. Up to 5000 characters for viduq4-preview.

Esempio:

"An astronaut walks through soft blue fog with a slow cinematic camera move."

seconds
string

Requested clip duration in seconds, sent as an integer string. Use 1 through 16 for viduq3 and viduq3-turbo, or 3 through 16 for viduq4-preview. Default is 5.

Esempio:

"1"

size
string

Output size as WxH. Supported WxH size values for viduq3 and viduq3-turbo: 960x528, 1280x720, 1920x1080. Supported WxH size values for viduq4-preview: 1280x720, 720x1280, 960x960, 1104x816, 816x1104. Default is 1280x720. For viduq4-preview reference-to-video, size sets the frame shape. For viduq4-preview image-to-video, the output keeps the aspect ratio of the input image.

input_reference

Reference images. For Q3 image-to-video, upload one image file up to 20 MB. For viduq4-preview image-to-video, send one image file or one publicly accessible HTTPS image URL. For viduq4-preview reference-to-video, send 2-12 publicly accessible HTTPS image URLs by repeating input_reference once per image. Use PNG, JPEG, or WEBP images. Omit this field for text-to-video.

reference_audios

Voice references for viduq4-preview reference-to-video. Send up to 3 publicly accessible HTTPS URLs of MP3 clips, each 3-12 seconds long, by repeating reference_audios once per clip. Send at least one input_reference image in the same request.

Pattern: ^https://

Risposta

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

id
string
obbligatorio

Task ID. Use this value with retrieve and content endpoints.

Esempio:

"task_example"

object
string
obbligatorio

Object type. Video tasks return video.

Esempio:

"video"

model
string
obbligatorio

Model ID used for the task, such as viduq3-turbo or viduq4-preview.

Esempio:

"viduq3-turbo"

status
enum<string>
obbligatorio

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

Opzioni disponibili:
queued,
in_progress,
completed,
failed,
error
Esempio:

"queued"

progress
integer
obbligatorio

Task progress as a coarse percentage.

Intervallo richiesto: 0 <= x <= 100
Esempio:

0

created_at
integer
obbligatorio

Task creation time as a Unix timestamp in seconds.

Esempio:

1779938152

task_id
string

Compatibility alias for id when present.

Esempio:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

Esempio:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

Esempio:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Ultima modifica il 27 ottobre 2026