Skip to main content
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
        }
      ]
    }
  }
}
Use this endpoint to run Kling’s image-recognition checks before you decide which downstream workflow to use.

What it returns

  • The route is synchronous and returns recognition flags directly
  • Current results indicate whether the image contains regions such as head_seg, face_seg, cloth_seg, and object_seg
  • Use these flags to decide whether a source image is suitable for avatar, try-on, or other asset-driven workflows
Live validation on 2026-03-13 returned SUCCEED with positive flags for head_seg, face_seg, cloth_seg, and object_seg.
For the complete parameter reference, see the official Kling documentation.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Headers

Content-Type
string

Optional content type header.

Body

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

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.

Response

200 - application/json

Recognition result.

code
integer
required
message
string
required
data
object
required
request_id
string