Lấy một tác vụ Kling
Truy vấn một tác vụ tạo video Kling bằng task_id và trả về trạng thái, tiến độ cùng siêu dữ liệu kết quả của tác vụ đó để thăm dò.
Những điều cần kiểm tra trước tiên
task.task_status; các tác vụ Motion Control sử dụngsubmitted,processing,succeed, hoặcfailedtask.task_result.videos[0].urlkhi một tác vụ video thành côngtask.task_status_msghoặc các trường chi tiết khác được trả về khi tác vụ dừng sớmcode,message, vàrequest_idkhi phản hồi sử dụng envelope tiêu chuẩn envelope
Mẫu thăm dò
Tạo tác vụ từ endpoint tương ứng
Thăm dò cho đến khi tác vụ kết thúc
succeed và failed.Tiếp tục đến bước quy trình tiếp theo
Các cặp đường dẫn phổ biến
Ủy quyền
Bearer token authentication. Use your CometAPI key.
Tham số đường dẫn
Resource type. One of: images, videos, audio.
Sub-action matching the resource type. For images: generations, kolors-virtual-try-on. For videos: text2video, image2video, motion-control, lip-sync, effects, multi-image2video, multi-elements. For audio: text-to-audio, video-to-audio.
Task ID
Phản hồi
Current Kling task state.
- Option 1
- Option 2
A query can return the task object directly or inside the standard response envelope. Normalize both shapes before reading task fields.
Kling task ID.
Current task state. Compatible Motion Control tasks use submitted, processing, succeed, or failed.
Failure or status detail when returned.
Additional task metadata. The object can be empty.
Absent on an initial submitted task, commonly empty while processing or after failure, and populated when a task succeeds.
Watermark information when returned by a compatible workflow.
Task creation timestamp in milliseconds.
Last task update timestamp in milliseconds.
Final unit deduction value, when returned.
Final balance deduction values, when returned.