メインコンテンツへスキップ
POST
/
kling
/
v1
/
videos
/
image-recognize
Run Kling image recognition
curl --request POST \
  --url https://api.cometapi.com/kling/v1/videos/image-recognize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image": "https://cc.tvbs.com.tw/portal/images/2018/anchor21.jpg"
}
'
{
  "code": 0,
  "message": "SUCCEED",
  "data": {
    "task_result": {
      "images": [
        {
          "type": "head_seg",
          "is_contain": true
        },
        {
          "type": "face_seg",
          "is_contain": true
        },
        {
          "type": "cloth_seg",
          "is_contain": true
        },
        {
          "type": "object_seg",
          "is_contain": true
        }
      ]
    }
  }
}
このエンドポイントを使用すると、どの後続ワークフローを使うか決める前に、Kling の画像認識チェックを実行できます。

返される内容

  • このルートは同期式で、認識フラグを直接返します
  • 現在の結果では、画像に head_segface_segcloth_segobject_seg などの領域が含まれているかどうかを示します
  • これらのフラグを使用して、元画像が avatar、try-on、またはその他のアセット駆動型ワークフローに適しているかを判断できます
2026-03-13 のライブ検証では、head_segface_segcloth_segobject_seg に対して positive フラグが付き、SUCCEED が返されました。
完全なパラメータリファレンスについては、Kling の公式ドキュメントを参照してください。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ヘッダー

Content-Type
string

Optional content type header.

ボディ

application/json
image
string
デフォルト:https://cc.tvbs.com.tw/portal/images/2018/anchor21.jpg
必須

Image to analyze. Accepts an image URL or raw Base64 string (no data: prefix). Supported formats: JPG, JPEG, PNG. Max 10 MB, minimum 300 px per side, aspect ratio between 1:2.5 and 2.5:1.

レスポンス

200 - application/json

Recognition result.

code
integer
必須
message
string
必須
data
object
必須
request_id
string