Chuyển đến nội dung chính
POST
Sử dụng endpoint này cho quy trình Kling Omni tương thích O1 do CometAPI cung cấp, bao gồm tạo video từ văn bản và tạo video tham chiếu theo hình ảnh khung hình đầu tiên.
Để xem tài liệu tham chiếu đầy đủ về tham số của nhà cung cấp, hãy xem tài liệu Kling Omni Video.

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

  • Tạo video từ văn bản: gửi prompt, mode, aspect_ratioduration
  • Tham chiếu hình ảnh khung hình đầu tiên: thêm các mục image_list với image_urltype: first_frame, sau đó tham chiếu hình ảnh trong prompt dưới dạng <<<image_1>>>
  • Đầu ra có watermark: thêm watermark_info.enabled: true khi bạn cần URL video có watermark trong phản hồi truy vấn
  • Model ID: bỏ qua model_name để dùng mặc định của route, hoặc gửi một model ID Omni Video đã được kiểm thử như kling-video-o1 hoặc kling-v3-omni

Thời lượng và tỷ lệ khung hình

Kling Omni không cung cấp trường size chính xác. Hãy xem aspect_ratio như một yêu cầu về hình dạng khung hình; một yêu cầu tạo video từ văn bản 16:9 có thể được kết xuất ở full-HD 1920x1080.

Luồng tác vụ

1

Tạo tác vụ Omni

Gửi yêu cầu và lưu task_id được trả về.
2

Thăm dò tác vụ Omni

Tiếp tục với Lấy video Kling Omni cho đến khi tác vụ hoàn tất.
3

Lưu trữ video đã hoàn tất

Chuyển URL MP4 được trả về vào hệ thống lưu trữ của riêng bạn nếu bạn cần truy cập lâu dài.

Ủy quyền

Authorization
string
header
bắt buộc

Bearer token authentication. Use your CometAPI key.

Tiêu đề

Content-Type
string

Content type of the request body.

Nội dung

application/json
prompt
string
bắt buộc

Text prompt describing the desired video. Maximum length is 2,500 characters. When you send image_list, reference the image with <<<image_1>>>.

model_name
string

Optional model ID for this Kling Omni video request. Omit this field to use the route default.

image_list
object[]

Optional first-frame image reference for image-referenced Omni generation.

sound
enum<string>
mặc định:off

Whether to generate audio with the video. Use on or off.

Tùy chọn có sẵn:
on,
off
mode
enum<string>

Generation mode. Use std for standard generation or pro when the selected model supports the higher-quality mode.

Tùy chọn có sẵn:
std,
pro
aspect_ratio
enum<string>

Aspect ratio request for beta Kling Omni generation. The endpoint does not expose an exact size field; a 16:9 text-to-video request can render as 1920x1080.

Tùy chọn có sẵn:
16:9,
9:16,
1:1
duration
enum<string>
mặc định:5

Requested output length for text-to-video and first-frame image-reference workflows. Use 5 or 10 as a string.

Tùy chọn có sẵn:
5,
10
watermark_info
object

Watermark options. When enabled is true, the task can return watermarked result URLs in addition to original result URLs.

callback_url
string<uri>

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

Phản hồi

200 - application/json

Success

code
integer
bắt buộc

Response code. 0 means the task request was accepted.

message
string
bắt buộc

Response message.

data
object
bắt buộc
request_id
string

Request identifier returned by CometAPI when present.