Створення відео Flux 3
Створіть відео Flux 3 із тексту, референсних зображень або першого й останнього кадрів за допомогою пресету розміру 720p чи 1080p.
id, щоб опитувати завдання та завантажити готове відео.
POST /v1/videos використовує multipart/form-data. Надсилайте параметри керування як поля форми. Для вхідних зображень використовуйте URL-адреси референсних зображень або початковий і кінцевий кадри.
Зберігайте input_reference окремо від first_frame і last_frame.
Виберіть режим введення
Використання референсних зображень
Полеinput_reference приймає лише загальнодоступні HTTPS URL-адреси зображень. Надішліть його один раз для одного зображення або повторіть у порядку ключових кадрів для кількох зображень. Використовуйте одну URL-адресу на поле, загалом до 10 URL-адрес.
Опишіть рух, поведінку камери та візуальні деталі, які згенероване відео має зберегти з референсного зображення.
Зразки запитів у верхній частині цієї сторінки показують введення одного та кількох зображень. У наведеному нижче запиті використовуються два зображення в порядку їх надсилання:
Установіть перший і останній кадри
Надішлітьfirst_frame, щоб установити початкове зображення. Щоб також установити кінцеве зображення, додайте last_frame і опишіть рух між двома кадрами в prompt.
Лише для початкового кадру не вказуйте last_frame. Для кінцевого кадру потрібні як first_frame, так і last_frame.
Кожне поле приймає одну загальнодоступну HTTPS URL-адресу або один файл PNG чи JPEG. Надсилайте кожне поле один раз, використовуючи URL-адресу або файл. Розмір кожного файлу має бути не більшим за 20 MiB (20 × 1024 × 1024 байтів).
Приклади кадрів у верхній частині цієї сторінки показують URL-введення та завантаження файлів із явно встановленими seconds і size.
Установіть тривалість і розмір
Явно встановітьseconds як ціле число від 5 до 20.
Установіть для size одне з цих точних значень пресету WxH:
Потік завдання
Створіть завдання
id.Опитуйте завдання
status не матиме значення completed або failed.Завантажте результат
completed, викличте Завантаження відеовмісту Flux 3 щоб зберегти файл MP4.Авторизації
Bearer authentication. Use your CometAPI API key.
Тіло
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://Відповідь
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.