Crear un vídeo de Flux 3
Cree un vídeo de Flux 3 a partir de texto, imágenes de referencia o fotogramas inicial y final con un tamaño preestablecido de 720p o 1080p.
id devuelto para consultar la tarea y descargar el vídeo completado.
POST /v1/videos usa multipart/form-data. Envíe los controles como campos de formulario. Para las entradas de imagen, use URL de imágenes de referencia o fotogramas inicial y final.
Mantenga input_reference separado de first_frame y last_frame.
Elija un modo de entrada
Usar imágenes de referencia
El campoinput_reference solo acepta URL de imágenes HTTPS accesibles públicamente. Envíelo una vez para una sola imagen o repítalo en el orden de los fotogramas clave para varias imágenes. Use una URL por campo, con un máximo de 10 URL en total.
Describa el movimiento, el comportamiento de la cámara y los detalles visuales que el vídeo generado debe conservar de la imagen de referencia.
Los ejemplos de solicitudes en la parte superior de esta página muestran entradas de una sola imagen y de varias imágenes. La siguiente solicitud usa dos imágenes en el orden en que se enviaron:
Establecer los fotogramas inicial y final
Envíefirst_frame para establecer la imagen inicial. Para establecer también la imagen final, incluya last_frame y describa el movimiento entre los dos fotogramas en prompt.
Para un fotograma inicial únicamente, omita last_frame. Un fotograma final requiere tanto first_frame como last_frame.
Cada campo acepta una URL HTTPS accesible públicamente o un archivo PNG o JPEG. Envíe cada campo una vez, mediante una URL o un archivo. Mantenga cada archivo en 20 MiB o menos (20 × 1024 × 1024 bytes).
Los ejemplos de fotogramas en la parte superior de esta página muestran entradas de URL y cargas de archivos, con seconds y size establecidos explícitamente.
Establecer la duración y el tamaño
Establezcaseconds explícitamente en un número entero de 5 a 20.
Establezca size en uno de estos valores preestablecidos exactos de WxH:
Flujo de la tarea
Crear la tarea
id devuelto.Consultar la tarea
status sea completed o failed.Descargar el resultado
completed, llame a Descargar contenido de vídeo de Flux 3 para guardar el archivo MP4.Autorizaciones
Bearer authentication. Use your CometAPI API key.
Cuerpo
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://Respuesta
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.