Zum Hauptinhalt springen
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.

Verwenden Sie diesen Endpoint, um die Bilderkennungsprüfungen von Kling auszuführen, bevor Sie entscheiden, welcher nachgelagerte Workflow verwendet werden soll.

Was zurückgegeben wird

  • Die Route ist synchron und gibt Erkennungs-Flags direkt zurück
  • Aktuelle Ergebnisse zeigen an, ob das Bild Bereiche wie head_seg, face_seg, cloth_seg und object_seg enthält
  • Verwenden Sie diese Flags, um zu entscheiden, ob ein Quellbild für Avatar-, Try-on- oder andere asset-gesteuerte Workflows geeignet ist
Eine vollständige Parameterreferenz finden Sie in der offiziellen Kling-Dokumentation.

Autorisierungen

Authorization
string
header
erforderlich

Bearer token authentication. Use your CometAPI key.

Header

Content-Type
string

Optional content type header.

Body

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

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.

Antwort

200 - application/json

Recognition result.

code
integer
erforderlich
message
string
erforderlich
data
object
erforderlich
request_id
string