> ## 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 人脸识别

> 识别源视频中的人脸，并创建高级对口型所需的会话。



## OpenAPI

````yaml zh/api-reference/model-api/kling/openapi/kling-identify-face/openapi.yaml POST /kling/v1/videos/identify-face
openapi: 3.1.0
info:
  title: Kling 人脸识别
  description: 识别源视频中的人脸并为高级对口型创建会话。
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/identify-face:
    post:
      summary: 识别人脸
      description: 本接口同步返回会话和人脸可用时间区间，无需轮询。
      operationId: klingIdentifyFaceZh
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentifyFaceRequest'
      responses:
        '200':
          description: 人脸识别完成
          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: MP4 或 MOV 公网 URL，与 video_id 互斥。
        video_id:
          type: string
          description: 30 天内由 Kling 生成的视频 ID，与 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: 当前 AnyFast 接口返回的请求 ID 字段。
        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: 人脸可用区间起点，单位毫秒。
        end_time:
          type: integer
          description: 人脸可用区间终点，单位毫秒。
    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: 视频或请求参数不合法
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: 鉴权失败
      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.