Naar hoofdinhoud gaan
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
        }
      ]
    }
  }
}
Gebruik deze endpoint om de image-recognition-controles van Kling uit te voeren voordat je beslist welke downstream-workflow je wilt gebruiken.

Wat het retourneert

  • De route is synchroon en retourneert herkenningsvlaggen direct
  • De huidige resultaten geven aan of de afbeelding regio’s bevat zoals head_seg, face_seg, cloth_seg en object_seg
  • Gebruik deze vlaggen om te bepalen of een bronafbeelding geschikt is voor avatar-, try-on- of andere asset-gedreven workflows
Live validatie op 2026-03-13 retourneerde SUCCEED met positieve vlaggen voor head_seg, face_seg, cloth_seg en object_seg.
Zie voor de volledige parameterreferentie de officiële Kling-documentatie.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Headers

Content-Type
string

Optional content type header.

Body

application/json
image
string
standaard:https://cc.tvbs.com.tw/portal/images/2018/anchor21.jpg
vereist

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.

Respons

200 - application/json

Recognition result.

code
integer
vereist
message
string
vereist
data
object
vereist
request_id
string