> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# kling-identify-face

> Analyze a video and detect all human faces in it. Returns a `session_id` and a `face_list` that are required for the subsequent lip sync generation step.

This is a **synchronous** call — the result is returned immediately, not as an async task.




## OpenAPI

````yaml api-reference/model-api/kuaishou/openapi/kling-identify-face/openapi.yaml POST /kling/v1/videos/identify-face
openapi: 3.1.0
info:
  title: Kling Identify Face
  description: >-
    Detect and register faces in a video as a prerequisite for lip sync
    generation.
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/identify-face:
    post:
      summary: Identify Face
      description: >
        Analyze a video and detect all human faces in it. Returns a `session_id`
        and a `face_list` that are required for the subsequent lip sync
        generation step.


        This is a **synchronous** call — the result is returned immediately, not
        as an async task.
      operationId: klingIdentifyFace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                video_url:
                  type: string
                  description: >
                    Public URL of the video to analyze. The video must contain
                    at least one clearly visible human face.

                    Required if `video_id` is not provided.
                  example: https://example.com/person-speaking.mp4
                video_id:
                  type: string
                  description: >
                    ID of a video previously generated by Kling (e.g. from a
                    text-to-video or image-to-video task result).

                    Required if `video_url` is not provided.
                  example: '860260754053148756'
      responses:
        '200':
          description: Face detection successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: SUCCEED
                  data:
                    type: object
                    properties:
                      session_id:
                        type: string
                        description: >-
                          Session ID binding the video and face analysis result.
                          Pass this to the lip sync endpoint.
                        example: abc123-session-id
                      face_list:
                        type: array
                        description: >-
                          List of detected faces. May contain multiple entries
                          if multiple people appear in the video.
                        items:
                          type: object
                          properties:
                            face_id:
                              type: string
                              description: >-
                                Unique identifier for this face within the
                                session.
                              example: face_001
                            face_rect:
                              type: object
                              description: Bounding box of the face in the video frame.
                              properties:
                                x:
                                  type: integer
                                  example: 120
                                'y':
                                  type: integer
                                  example: 80
                                width:
                                  type: integer
                                  example: 200
                                height:
                                  type: integer
                                  example: 250
        '400':
          description: Invalid request or face detection failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````