メインコンテンツへスキップ
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
        }
      ]
    }
  }
}

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 の画像認識チェックを実行するために使用します。

返される内容

  • このルートは同期式で、認識フラグを直接返します
  • 現在の結果では、画像に head_segface_segcloth_segobject_seg などの領域が含まれているかどうかを示します
  • これらのフラグを使って、ソース画像がアバター、try-on、その他のアセット駆動型ワークフローに適しているかどうかを判断できます
完全なパラメータリファレンスについては、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