跳转到主要内容
POST
/
kling
/
v1
/
videos
/
identify-face
人脸识别
curl --request POST \
  --url https://www.anyfast.ai/kling/v1/videos/identify-face \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "video_url": "https://example.com/person-speaking.mp4",
  "video_id": "860260754053148756"
}
'
{
  "code": 0,
  "message": "SUCCEED",
  "data": {
    "session_id": "abc123-session-id",
    "face_list": [
      {
        "face_id": "face_001",
        "face_rect": {
          "x": 120,
          "y": 80,
          "width": 200,
          "height": 250
        }
      }
    ]
  }
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
video_url
string

待分析视频的公网 URL,视频中须包含至少一张清晰可见的人脸。 与 video_id 二选一必填。

示例:

"https://example.com/person-speaking.mp4"

video_id
string

Kling 之前生成的视频 ID(如文生视频或图生视频任务的结果)。 与 video_url 二选一必填。

示例:

"860260754053148756"

响应

人脸检测成功

code
integer
示例:

0

message
string
示例:

"SUCCEED"

data
object