Bir Kling görevi alın
Bir Kling video oluşturma görevini task_id ile sorgulayın ve yoklama için durumunu, ilerlemesini ve sonuç meta verilerini döndürün.
Önce kontrol edilecekler
task.task_status; Motion Control görevlerisubmitted,processing,succeed, veyafailedtask.task_result.videos[0].urlbir video görevi başarılı olduğunda kullanırtask.task_status_msgya da bir görev erken durduğunda döndürülen diğer ayrıntı alanlarını kullanırcode,message, ayrıca yanıt standart olduğundarequest_idkullanır zarfını kullanır.
Yoklama düzeni
Görevi eşleşen endpoint'ten oluşturun
Görev terminal duruma ulaşana kadar yoklayın
succeed ve failed.İş akışındaki sonraki adıma geçin
Yaygın yol çiftleri
Yetkilendirmeler
Bearer token authentication. Use your CometAPI key.
Yol Parametreleri
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
Yanıt
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.