跳轉到主要內容
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 等區域
  • 使用這些旗標來判斷來源影像是否適合用於 avatar、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