Skip to main content
GET
このエンドポイント群は、Kling タスクを作成した後に使用します。Kling の非同期メディアジョブに共通するポーリング手順です。

最初に確認すること

  • クエリ受付の確認には codemessagerequest_id
  • タスク状態の確認には data.task_status。たとえば submittedprocessingsucceedfailed
  • タスク成功時の data.task_result.videos[0].url
  • タスクが途中で停止した場合の data.task_status_msg またはその他の返却詳細フィールド

ポーリングパターン

1

対応するエンドポイントからタスクを作成する

Text to VideoImage to Video など、ワークフローに対応する Kling の作成ページから始めます。
2

タスクが終端状態になるまでポーリングする

返された task id を使って、data.task_statussucceed または failed に達するまでクエリを続けます。
3

次のワークフローステップに進む

完了した出力をそのまま直接使用するか、ワークフローが連鎖処理に対応している場合は、次のプロバイダー固有アクションページに進みます。

一般的なパスの組み合わせ

完全なパラメータリファレンスについては、official Kling documentation を参照してください。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

パスパラメータ

action
string
必須

Resource type. One of: images, videos, audio.

action2
string
必須

Sub-action matching the resource type. For images: generations, kolors-virtual-try-on. For videos: text2video, image2video, lip-sync, effects, multi-image2video, multi-elements. For audio: text-to-audio, video-to-audio.

task_id
string
必須

Task ID

レスポンス

200 - application/json

Current Kling task state.

code
integer
必須

Kling response code. 0 indicates the query was accepted.

message
string
必須

Kling response message.

request_id
string
必須

Identifier for this query request.

data
object
必須