Przejdź do głównej treści
POST
Utwórz film Veo 3.1 z tekstu lub obrazu. API natychmiast zwraca identyfikator zadania. Zapisz zwrócone id, aby odpytywać zadanie i pobrać ukończony film. POST /v1/videos używa multipart/form-data. Kontrolki wyślij jako pola formularza, a obraz jako pole pliku input_reference.

Wybierz model

Wybierz tryb wejściowy

Aby animować obraz, prześlij jeden plik przez input_reference, używając pola tylko raz. Obraz określa klatkę otwierającą; prompt opisuje następujący ruch i zachowanie kamery.

Ustaw czas trwania i rozmiar

W przypadku tej zgodnej z OpenAI ścieżki ustaw czas trwania za pomocą jawnej wartości całkowitej seconds, a rozmiar wyjściowy za pomocą size. Obie wartości wyślij jako pola formularza. Ustaw size na jedną z poniższych wartości WxH.

Przebieg zadania

1

Utwórz zadanie

Wyślij żądanie formularza multipart i zapisz zwrócone id.
2

Odpytywanie zadania

Użyj Veo3 Retrieve aż status przyjmie wartość completed, failed lub error.
3

Pobierz wynik

Gdy zadanie ma status completed, pobierz plik MP4 z odpowiedzi ukończonego zadania.

Autoryzacje

Authorization
string
header
wymagane

Bearer authentication. Use your CometAPI API key.

Treść

multipart/form-data
model
enum<string>
wymagane

Veo 3.1 model ID. Use veo3.1-fast for the default route or veo3.1 when you specifically need the standard model.

Dostępne opcje:
veo3.1-fast,
veo3.1
Przykład:

"veo3.1-fast"

prompt
string
wymagane

Text prompt for the video job.

Przykład:

"A paper kite floats above a field."

seconds
enum<integer>
domyślnie:4

Requested clip duration in whole seconds. Send 4, 6, or 8 as a form field.

Dostępne opcje:
4,
6,
8
Przykład:

4

size
string

Supported WxH size values: 1280x720, 720x1280, 1920x1080, 3840x2160. Default is 1280x720.

Przykład:

"1280x720"

input_reference
file

One image file that sets the opening frame for image-to-video. Send input_reference once with one file. Use prompt to describe the motion and camera behavior that follow.

Odpowiedź

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

id
string
wymagane

Task ID. Use this value with retrieve and content endpoints.

Przykład:

"task_example"

object
string
wymagane

Object type. Video tasks return video.

Przykład:

"video"

model
string
wymagane

Model ID used for the task.

Przykład:

"veo3.1-fast"

status
enum<string>
wymagane

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

Dostępne opcje:
queued,
in_progress,
completed,
failed,
error
Przykład:

"queued"

progress
integer
wymagane

Task progress as a coarse percentage.

Wymagany zakres: 0 <= x <= 100
Przykład:

0

created_at
integer
wymagane

Task creation time as a Unix timestamp in seconds.

Przykład:

1779938152

task_id
string

Compatibility alias for id when present.

Przykład:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

Przykład:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

Przykład:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Ostatnia modyfikacja 9 września 2026