Kling タスクを取得
task_id で Kling 動画生成タスクをクエリし、ポーリング用にそのステータス、進行状況、結果メタデータを返します。
最初に確認する項目
task.task_status;Motion Control タスクではsubmitted、processing、succeedまたはfailedtask.task_result.videos[0].urlビデオタスクが成功した場合task.task_status_msgまたはタスクが早期に停止した場合は、返されたその他の詳細フィールドcode,message、およびrequest_id。レスポンスで標準の エンベロープが使用される場合に確認します。
ポーリングパターン
対応するエンドポイントからタスクを作成する
タスクが終端状態になるまでポーリングする
succeed と failed です。次のワークフローステップに進む
一般的なパスの組み合わせ
承認
Bearer token authentication. Use your CometAPI key.
パスパラメータ
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
レスポンス
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.