Skip to main content
POST
/
kling
/
v1
/
videos
/
image-recognize
cURL
curl https://api.cometapi.com/kling/v1/videos/image-recognize \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "image": "https://your-image-host/portrait.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
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
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