メインコンテンツへスキップ
GET
/
kling
/
v1
/
{action}
/
{action2}
/
{task_id}
Individual queries
curl --request GET \
  --url https://api.cometapi.com/kling/v1/{action}/{action2}/{task_id} \
  --header 'Authorization: Bearer <token>'
{
  "code": 0,
  "message": "SUCCEED",
  "request_id": "9ab376fc-9059-487f-9e2a-c9c89f1a344f",
  "data": {
    "task_id": "878106242831892487",
    "task_info": {},
    "created_at": 1777385361501,
    "updated_at": 1777385363321,
    "task_result": {},
    "task_status": "processing"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Kling タスクを作成した後に、このエンドポイント群を使用します。これは Kling の非同期メディアジョブにおける一般的なポーリング手順です。

最初に確認すること

  • クエリ受付確認のための codemessagerequest_id
  • submittedprocessingsucceedfailed などのタスク状態を示す data.task_status
  • タスク成功時の data.task_result.videos[0].url
  • タスクが途中で停止した場合の data.task_status_msg またはその他の返却された詳細フィールド

ポーリングパターン

1

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

ワークフローに対応する Kling の作成ページから開始します。たとえば、Text to VideoImage to Video です。
2

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

data.task_statussucceed または failed に達するまで、返された task id を使ってクエリを続けてください。
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
必須