Crea un video HappyHorse
Crea un’attività video HappyHorse da testo a video o da immagine di riferimento tramite CometAPI con POST /v1/videos, quindi esegui il polling dell’attività e scarica il file MP4 completato.
id restituito per eseguire il polling dell’attività e scaricare il video completato.
POST /v1/videos utilizza multipart/form-data. Invia i controlli come campi del modulo e le immagini di riferimento come campi input_reference, con un URL HTTPS o un file immagine caricato per campo.
Scegli una modalità di input
input_reference una volta per immagine nell’ordine delle immagini.
Utilizza solo URL o solo file all’interno di questo campo. Invia ogni URL separatamente anziché unire gli URL con virgole.
Per input_reference, ogni immagine di riferimento deve avere dimensioni pari o inferiori a 10 MB con happyhorse-1.0.
Con happyhorse-1.1, ogni immagine di riferimento deve avere dimensioni pari o inferiori a 20 MB.
Questi limiti del modello si applicano sia agli URL delle immagini sia ai file caricati.
Utilizza immagini JPEG, JPG, PNG o WEBP con un lato più corto di almeno 400 px.
Il limite di caricamento input_reference è di 20 MiB (20 × 1024 × 1024 byte) per file. Le immagini caricate devono inoltre rispettare il limite specifico del modello indicato sopra.
Gli esempi di richieste all’inizio di questa pagina mostrano più URL di immagini per HappyHorse 1.1 e più caricamenti di file per entrambi i modelli.
Per impostare il fotogramma iniziale, invia first_frame una volta con un URL HTTPS di immagine pubblicamente accessibile o un file immagine. Utilizza questo campo in una richiesta separata da input_reference.
Imposta durata e dimensioni
WxH esatto per size dalla tabella seguente.
Per le richieste con primo fotogramma, l’immagine determina l’inquadratura e le proporzioni, mentre size seleziona il livello di risoluzione dell’output.
Flusso dell’attività
Crea l'attività
id restituito.Esegui il polling dell'attività
status non è completed, failed o error.Scarica il risultato
completed, chiama Recupera il contenuto del video HappyHorse per scaricare il file MP4.Autorizzazioni
Bearer authentication. Use your CometAPI API key.
Corpo
HappyHorse model ID for this endpoint.
happyhorse-1.0, happyhorse-1.1 "happyhorse-1.1"
Text prompt that describes the video to generate. For image inputs, describe the motion and visual details to preserve.
"Use the uploaded reference image as the visual guide. Create a short cinematic shot with gentle natural motion."
Requested clip duration in whole seconds. Send an integer from 3 through 15 as a form field. The default is 5.
3 <= x <= 153
Output size as an exact WxH value. Use one of the documented size values for the selected HappyHorse model. For first-frame requests, size selects the resolution tier; the image determines the framing and aspect ratio.
"1920x1080"
Reference images for reference-to-video. Send 1–9 publicly accessible HTTPS image URLs or 1–9 uploaded image files by repeating input_reference once per image. Use only URLs or only files within this field; do not join URLs with commas. Reference images guide subjects and visual details. CometAPI preserves image order. Use JPEG, JPG, PNG, or WEBP images with a shortest side of at least 400 px. Each reference image must be at or below 10 MB for happyhorse-1.0 or 20 MB for happyhorse-1.1. These model limits apply to both image URLs and uploaded files. The input_reference file upload limit is 20 MiB (20 x 1024 x 1024 bytes) per file. Keep uploads within the model limit as well. Keep this field separate from first_frame.
^https://Opening-frame image as one publicly accessible HTTPS URL or one image file. Send this field once, using either a URL or a file. Use JPEG, JPG, PNG, or WEBP images up to 20 MB. Do not combine first_frame with input_reference.
^https://Risposta
Task created. Store the returned id and poll GET /v1/videos/{task_id}.
Task ID. Use this value with retrieve and content endpoints.
"task_example"
Object type. Video tasks return video.
"video"
Model ID used for the task.
"happyhorse-1.1"
Task lifecycle status. Poll until the value is completed, failed, or error.
queued, in_progress, completed, failed, error "queued"
Task progress as a coarse percentage.
0 <= x <= 1000
Task creation time as a Unix timestamp in seconds.
1779938152
Compatibility alias for id when present.
"task_example"
Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.
1779938219
Temporary video delivery URL. This field appears on completed tasks.
"<temporary-video-url>"
Failure details. This field appears when the task fails.