Skip to main content
POST
cURL
Użyj tego endpointu, aby rozpocząć zadanie wideo Veo 3.1. API natychmiast zwraca identyfikator zadania, więc zapisz zwrócone id i odpytywuj zadanie, aż osiągnie status końcowy. POST /v1/videos używa multipart/form-data; przekaż kontrolki skalarne jako pola formularza, a wejścia multimedialne jako pola plików input_reference.

Wybierz model

Wybierz tryb wejścia

Ustaw czas trwania i rozmiar

Dla ścieżki zgodnej z OpenAI użyj seconds dla czasu trwania i size dla rozmiaru wyjściowego. Wysyłaj wartości jako pola formularza. Ustaw size na jedną z poniższych wartości WxH.

Przepływ zadania

1

Utwórz zadanie

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

Odpytywuj zadanie

Używaj Veo3 Retrieve, aż status będzie równy 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<string>
domyślnie:4

Requested clip duration. Use 4, 6, or 8. Send the value as a form field string.

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

Optional first-frame image file for image-to-video.

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.