Chuyển đến nội dung chính
GET
cURL
Sử dụng endpoint này sau khi gửi yêu cầu tạo model-route Kling. Lưu data.id từ phản hồi tạo và truyền ID đó dưới dạng task_ids.

Tham số yêu cầu

Để truy xuất một tác vụ, thay thế <task_id> bằng giá trị data.id từ phản hồi tạo:
Ngay sau khi tạo, phản hồi chứa tác vụ đã gửi:

Đọc kết quả

Đọc tác vụ từ data[0] và tiếp tục truy vấn cho đến khi status của tác vụ ở trạng thái kết thúc. Khi trạng thái là succeeded, hãy đọc URL video từ mảng outputs của tác vụ đó. Một số phản hồi tương thích Comet được quan sát trả về một đối tượng tác vụ thuần hoặc chứa status cấp cao nhất; đây là các dạng tương thích, không phải envelope chuẩn. Khi có data, hãy dùng data[0].status. Một tác vụ đã hoàn tất có cấu trúc phản hồi như sau:
Lưu video đã hoàn tất vào kho lưu trữ của riêng bạn nếu cần giữ lại video sau thời gian URL được trả về còn khả dụng.

Ủy quyền

Authorization
string
header
bắt buộc

Use your CometAPI API key as a Bearer token.

Tham số truy vấn

task_ids
string
bắt buộc

Task ID from the data.id field of a creation response. This CometAPI route documents one task_ids value per request.

Phản hồi

200 - application/json

The task state and available outputs are returned in the data array.

Canonical task response for the CometAPI route. Read the selected task from data[0]; a bare task object is a compatibility form.

data
object[]
bắt buộc

The task record returned for the requested task. The current CometAPI route returns it as data[0].

Required array length: 1 element
code

Response code returned with the task list.

message
string

Response message returned with the task list.

status
string

Observed Comet compatibility response-level status when returned. Read the selected task state from data[0].status.

request_id
string

Request ID for support when returned.

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