Create a Flux 3 video
Create a Flux 3 video from text, reference images, or first and last frames with a 720p or 1080p size preset.
id to poll the task and download the completed video.
POST /v1/videos uses multipart/form-data. Send controls as form fields. For image inputs, use reference image URLs or opening and closing frames.
Keep input_reference separate from first_frame and last_frame.
Choose an input mode
Use reference images
Theinput_reference field accepts publicly accessible HTTPS image URLs only. Send it once for a single image, or repeat it in keyframe order for multiple images. Use one URL per field, up to 10 URLs in total.
Describe the motion, camera behavior, and visual details that the generated video should preserve from the reference image.
The request samples at the top of this page show single-image and multiple-image inputs. The following request uses two images in their submitted order:
Set the first and last frames
Sendfirst_frame to set the opening image. To also set the closing image, include last_frame and describe the motion between the two frames in prompt.
For an opening frame alone, omit last_frame. A closing frame requires both first_frame and last_frame.
Each field accepts one publicly accessible HTTPS URL or one PNG or JPEG file. Send each field once, using either a URL or a file. Keep each file at or below 20 MiB (20 × 1024 × 1024 bytes).
The frame examples at the top of this page show URL inputs and file uploads, with seconds and size set explicitly.
Set duration and size
Setseconds explicitly to an integer from 5 through 20.
Set size to one of these exact WxH preset values:
Task flow
Create the task
id.Poll the task
status is completed or failed.Download the result
completed, call Download Flux 3 video content to save the MP4 file.Authorizations
Bearer authentication. Use your CometAPI API key.
Body
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://Response
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.