Skip to main content
POST
Tạo video Veo 3.1 từ văn bản hoặc hình ảnh. API trả về ID tác vụ ngay lập tức. Lưu id được trả về để thăm dò tác vụ và tải xuống video đã hoàn tất. POST /v1/videos sử dụng multipart/form-data. Gửi các tùy chọn điều khiển dưới dạng trường biểu mẫu và một hình ảnh dưới dạng trường tệp input_reference.

Chọn một model

Chọn chế độ đầu vào

Để tạo hiệu ứng chuyển động cho một hình ảnh, hãy tải lên một tệp qua input_reference, sử dụng trường này một lần. Hình ảnh đặt khung hình mở đầu; prompt mô tả chuyển động và hành vi camera tiếp theo.

Đặt thời lượng và kích thước

Đối với tuyến tương thích OpenAI này, hãy đặt thời lượng bằng giá trị số nguyên seconds rõ ràng và kích thước đầu ra bằng size. Gửi cả hai giá trị dưới dạng trường biểu mẫu. Đặt size thành một trong các giá trị WxH bên dưới.

Luồng tác vụ

1

Tạo tác vụ

Gửi yêu cầu biểu mẫu multipart và lưu id được trả về.
2

Thăm dò tác vụ

Sử dụng Veo3 Retrieve cho đến khi statuscompleted, failed hoặc error.
3

Tải kết quả xuống

Khi tác vụ ở trạng thái completed, hãy tải tệp MP4 xuống từ phản hồi tác vụ đã hoàn tất.

Ủy quyền

Authorization
string
header
bắt buộc

Bearer authentication. Use your CometAPI API key.

Nội dung

multipart/form-data
model
enum<string>
bắt buộc

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

Tùy chọn có sẵn:
veo3.1-fast,
veo3.1
Ví dụ:

"veo3.1-fast"

prompt
string
bắt buộc

Text prompt for the video job.

Ví dụ:

"A paper kite floats above a field."

seconds
enum<integer>
mặc định:4

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

Tùy chọn có sẵn:
4,
6,
8
Ví dụ:

4

size
string

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

Ví dụ:

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

Phản hồi

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

id
string
bắt buộc

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

Ví dụ:

"task_example"

object
string
bắt buộc

Object type. Video tasks return video.

Ví dụ:

"video"

model
string
bắt buộc

Model ID used for the task.

Ví dụ:

"veo3.1-fast"

status
enum<string>
bắt buộc

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

Tùy chọn có sẵn:
queued,
in_progress,
completed,
failed,
error
Ví dụ:

"queued"

progress
integer
bắt buộc

Task progress as a coarse percentage.

Phạm vi bắt buộc: 0 <= x <= 100
Ví dụ:

0

created_at
integer
bắt buộc

Task creation time as a Unix timestamp in seconds.

Ví dụ:

1779938152

task_id
string

Compatibility alias for id when present.

Ví dụ:

"task_example"

completed_at
integer

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

Ví dụ:

1779938219

video_url
string

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

Ví dụ:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Lần sửa đổi cuối 9 tháng 9, 2026