> ## 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

> Detect faces in a source video and create the session required by Kling Lip Sync.



## OpenAPI

````yaml api-reference/model-api/kling/openapi/kling-identify-face/openapi.yaml POST /kling/v1/videos/identify-face
openapi: 3.1.0
info:
  title: Kling Identify Face
  description: Detect faces in a source video and create a session for Kling Lip Sync.
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/identify-face:
    post:
      summary: Identify faces
      description: >-
        This synchronous operation returns the session and usable face intervals
        immediately.
      operationId: klingIdentifyFace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentifyFaceRequest'
      responses:
        '200':
          description: Face identification completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentifyFaceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    IdentifyFaceRequest:
      type: object
      oneOf:
        - required:
            - video_url
        - required:
            - video_id
      properties:
        video_url:
          type: string
          format: uri
          description: Public MP4 or MOV URL. Mutually exclusive with video_id.
        video_id:
          type: string
          description: >-
            ID of a Kling-generated video created within 30 days. Mutually
            exclusive with video_url.
      example:
        video_url: https://example.com/person-speaking.mp4
    IdentifyFaceResponse:
      type: object
      properties:
        code:
          type: string
          example: '0'
        message:
          type: string
          example: SUCCEED
        requestId:
          type: string
          description: Request identifier returned by the current AnyFast endpoint.
        data:
          type: object
          properties:
            session_id:
              type: string
            face_data:
              type: array
              items:
                $ref: '#/components/schemas/FaceData'
            final_unit_deduction:
              type: string
            final_balance_deduction:
              $ref: '#/components/schemas/BalanceDeduction'
    FaceData:
      type: object
      properties:
        face_id:
          type: string
        face_image:
          type: string
          format: uri
        start_time:
          type: integer
          description: Usable interval start in milliseconds.
        end_time:
          type: integer
          description: Usable interval end in milliseconds.
    BalanceDeduction:
      type: object
      properties:
        quota:
          type: string
        list_price:
          type: string
    Error:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
        message:
          type: string
        data:
          nullable: true
  responses:
    BadRequest:
      description: Invalid video or request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.