Skip to main content
POST
cURL
Sử dụng endpoint này khi một ảnh nguồn là không đủ và bạn muốn Kling tạo chuyển động từ nhiều ảnh tham chiếu.

Trước khi gọi

  • Chuẩn bị từ 1 đến 4 ảnh trong image_list
  • Sử dụng ảnh đáp ứng yêu cầu pixel của Kling; các ảnh thu nhỏ quá nhỏ sẽ bị tác vụ tạo từ chối
  • Bỏ qua model_name trừ khi bạn thực sự cần chọn một model tương thích với route
  • Giữ lần thử đầu tiên đơn giản: một prompt ngắn, duration: 5, không có thiết lập callback bổ sung
  • Không gửi các trường mask của image-to-video như static_mask hoặc dynamic_masks trên route này

Luồng tác vụ

1

Gửi yêu cầu nhiều ảnh

Gửi danh sách ảnh, prompt và thời lượng, sau đó lưu Kling task_id được trả về.
2

Thăm dò tác vụ

Tiếp tục với Lấy một tác vụ Kling cho đến khi tác vụ đạt trạng thái kết thúc.
3

Lưu trữ kết quả

Lưu video đã hoàn tất nếu bạn cần lưu giữ vượt quá URL phân phối của nhà cung cấp.
Để xem tài liệu tham chiếu tham số đầy đủ, hãy xem tài liệu Kling chính thức.

Ủy quyền

Authorization
string
header
bắt buộc

Bearer token authentication. Use your CometAPI key.

Nội dung

application/json
image_list
object[]
bắt buộc

Input image references. Provide 1 to 4 items that meet Kling pixel requirements; very small thumbnails are rejected.

Required array length: 1 - 4 elements
model_name
enum<string>
mặc định:kling-v1-6

Kling model variant for multi-image video. Omit to use kling-v1-6.

Tùy chọn có sẵn:
kling-v1-6
prompt
string

Text prompt describing the desired motion and scene.

negative_prompt
string

Elements to avoid in the generated video.

mode
enum<string>
mặc định:std

Generation mode. Use std or pro; omitted requests use std.

Tùy chọn có sẵn:
std,
pro
duration
string
mặc định:5

Output video length in seconds. Use 5 or 10; omitted requests use 5.

aspect_ratio
enum<string>

Requested frame aspect ratio when the model needs an explicit frame shape.

Tùy chọn có sẵn:
16:9,
9:16,
1:1
callback_url
string

Webhook URL to receive task status updates.

external_task_id
string

Custom task id for your own tracking. Must be unique per account.

Phản hồi

200 - application/json

Task accepted.

code
integer
bắt buộc

Error code; specifically define the error code

message
string
bắt buộc

error message

data
object
bắt buộc