Langsung ke konten utama
POST
Buat video Flux 3 dari teks, gambar referensi, atau frame pertama dan terakhir. Simpan id yang dikembalikan untuk memeriksa task dan mengunduh video yang telah selesai. POST /v1/videos menggunakan multipart/form-data. Kirim kontrol sebagai field formulir. Untuk input gambar, gunakan URL gambar referensi atau frame pembuka dan penutup. Pisahkan input_reference dari first_frame dan last_frame.

Pilih mode input

Gunakan gambar referensi

Field input_reference hanya menerima URL gambar HTTPS yang dapat diakses publik. Kirim sekali untuk satu gambar, atau ulangi dalam urutan keyframe untuk beberapa gambar. Gunakan satu URL per field, hingga total 10 URL. Jelaskan gerakan, perilaku kamera, dan detail visual yang harus dipertahankan video yang dihasilkan dari gambar referensi. Contoh request di bagian atas halaman ini menampilkan input satu gambar dan beberapa gambar. Request berikut menggunakan dua gambar dalam urutan pengirimannya:

Atur frame pertama dan terakhir

Kirim first_frame untuk menetapkan gambar pembuka. Untuk juga menetapkan gambar penutup, sertakan last_frame dan jelaskan gerakan di antara kedua frame dalam prompt. Untuk frame pembuka saja, hilangkan last_frame. Frame penutup memerlukan first_frame dan last_frame. Setiap field menerima satu URL HTTPS yang dapat diakses publik atau satu file PNG atau JPEG. Kirim setiap field sekali, menggunakan URL atau file. Pastikan setiap file berukuran paling besar 20 MiB (20 × 1024 × 1024 byte). Contoh frame di bagian atas halaman ini menampilkan input URL dan unggahan file, dengan seconds dan size yang ditetapkan secara eksplisit.

Atur durasi dan ukuran

Tetapkan seconds secara eksplisit ke bilangan bulat dari 5 hingga 20. Tetapkan size ke salah satu nilai preset WxH berikut yang tepat: Nilai ukuran memilih tingkat resolusi output. Untuk teks-ke-video, dimensi terenkode dapat disesuaikan untuk perataan codec. Untuk gambar-ke-video, gambar referensi juga dapat menentukan pembingkaian akhir dan rasio aspek.

Alur task

1

Buat task

Kirim request formulir multipart dan simpan id yang dikembalikan.
2

Periksa task

Panggil Ambil video Flux 3 hingga status bernilai completed atau failed.
3

Unduh hasil

Saat task berstatus completed, panggil Unduh konten video Flux 3 untuk menyimpan file MP4.

Otorisasi

Authorization
string
header
wajib

Bearer authentication. Use your CometAPI API key.

Body

multipart/form-data

Flux 3 multipart request. Choose text, input_reference URLs, or first_frame and last_frame inputs. Keep reference-image and frame inputs separate.

model
string
default:flux-3
wajib

Model ID for this route. Use flux-3.

Allowed value: "flux-3"
prompt
string
default:A paper boat glides across a still pond while the camera moves forward.
wajib

Text that describes the scene, motion, camera behavior, and visual details that the video should preserve.

Minimum string length: 1
seconds
integer

Requested clip duration in whole seconds. Set seconds explicitly to an integer from 5 through 20.

Rentang yang diperlukan: 5 <= x <= 20
size
enum<string>
default:1280x720

Resolution 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.

Opsi yang tersedia:
1280x720,
1920x1080
input_reference

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.

Pattern: ^https://
first_frame
wajib if last_frame is set

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.

Pattern: ^https://
last_frame

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.

Pattern: ^https://

Respons

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

id
string
wajib

Task ID. Use this value as task_id in retrieve and content requests.

Contoh:

"<task_id>"

object
string
wajib

Object type for the asynchronous video task.

Allowed value: "video"
model
string
wajib

Model ID that the task uses.

Allowed value: "flux-3"
status
enum<string>
wajib

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

Opsi yang tersedia:
queued,
in_progress,
completed,
failed
progress
integer
wajib

Task progress as a coarse percentage.

Rentang yang diperlukan: 0 <= x <= 100
created_at
integer<int64>
wajib

Task creation time as a Unix timestamp in seconds.

task_id
string

Compatibility alias for id. This field can be omitted from retrieve responses.

Contoh:

"<task_id>"

completed_at
integer<int64>

Task completion time as a Unix timestamp in seconds when the task provides one.

expires_at
integer<int64>

Result expiration time as a Unix timestamp in seconds when the task provides one.

video_url
string<uri>

Video delivery URL. This field appears on completed tasks.

Contoh:

"https://media.example.com/flux-3-result.mp4"

error
object

Failure details. This field appears when the task fails.

Terakhir diubah pada 9 September 2026