Zum Hauptinhalt springen
POST
Erstellen Sie ein Flux 3-Video aus Text, Referenzbildern oder erstem und letztem Frame. Speichern Sie die zurückgegebene id, um die Aufgabe abzufragen und das fertige Video herunterzuladen. POST /v1/videos verwendet multipart/form-data. Senden Sie Steuerelemente als Formularfelder. Verwenden Sie für Bildeingaben URLs von Referenzbildern oder Anfangs- und Endframes. Halten Sie input_reference getrennt von first_frame und last_frame.

Eingabemodus auswählen

Referenzbilder verwenden

Das Feld input_reference akzeptiert nur öffentlich zugängliche HTTPS-Bild-URLs. Senden Sie es einmal für ein einzelnes Bild oder wiederholen Sie es in Keyframe-Reihenfolge für mehrere Bilder. Verwenden Sie pro Feld eine URL, insgesamt höchstens 10 URLs. Beschreiben Sie die Bewegung, das Kameraverhalten und die visuellen Details, die das generierte Video aus dem Referenzbild beibehalten soll. Die Anforderungsbeispiele oben auf dieser Seite zeigen Eingaben mit einem und mit mehreren Bildern. Die folgende Anfrage verwendet zwei Bilder in der übermittelten Reihenfolge:

Ersten und letzten Frame festlegen

Senden Sie first_frame, um das Anfangsbild festzulegen. Um auch das Endbild festzulegen, geben Sie last_frame an und beschreiben Sie die Bewegung zwischen den beiden Frames in prompt. Lassen Sie für einen Anfangsframe allein last_frame weg. Ein Endframe erfordert sowohl first_frame als auch last_frame. Jedes Feld akzeptiert eine öffentlich zugängliche HTTPS-URL oder eine PNG- oder JPEG-Datei. Senden Sie jedes Feld einmal, entweder mit einer URL oder einer Datei. Halten Sie jede Datei bei höchstens 20 MiB (20 × 1024 × 1024 Byte). Die Frame-Beispiele oben auf dieser Seite zeigen URL-Eingaben und Datei-Uploads, wobei seconds und size explizit festgelegt sind.

Dauer und Größe festlegen

Legen Sie seconds explizit auf eine ganze Zahl von 5 bis 20 fest. Legen Sie size auf einen dieser exakten Voreinstellungswerte für WxH fest: Der Größenwert wählt die Ausgabestufe für die Auflösung aus. Bei Text-zu-Video können die kodierten Abmessungen für die Codec-Ausrichtung angepasst werden. Bei Bild-zu-Video kann das Referenzbild auch den endgültigen Bildausschnitt und das Seitenverhältnis bestimmen.

Aufgabenablauf

1

Aufgabe erstellen

Senden Sie die Multipart-Formularanfrage und speichern Sie die zurückgegebene id.
2

Aufgabe abfragen

Rufen Sie Flux 3-Video abrufen auf, bis status den Wert completed oder failed hat.
3

Ergebnis herunterladen

Wenn die Aufgabe completed ist, rufen Sie Flux 3-Videoinhalt herunterladen auf, um die MP4-Datei zu speichern.

Autorisierungen

Authorization
string
header
erforderlich

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
Standard:flux-3
erforderlich

Model ID for this route. Use flux-3.

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

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.

Erforderlicher Bereich: 5 <= x <= 20
size
enum<string>
Standard: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.

Verfügbare Optionen:
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
erforderlich 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://

Antwort

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

id
string
erforderlich

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

Beispiel:

"<task_id>"

object
string
erforderlich

Object type for the asynchronous video task.

Allowed value: "video"
model
string
erforderlich

Model ID that the task uses.

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

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

Verfügbare Optionen:
queued,
in_progress,
completed,
failed
progress
integer
erforderlich

Task progress as a coarse percentage.

Erforderlicher Bereich: 0 <= x <= 100
created_at
integer<int64>
erforderlich

Task creation time as a Unix timestamp in seconds.

task_id
string

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

Beispiel:

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

Beispiel:

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

error
object

Failure details. This field appears when the task fails.

Zuletzt geändert am 9. September 2026