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

# Kling Face Identification

> Detect faces in a source video and establish a session for lip sync generation.

Face identification is the **first step** in the Kling lip sync workflow. It analyzes faces in a video and returns a `session_id` that must be used in the subsequent [lip sync generation](/en/guides/model-api/kuaishou/kling-lip-sync) request.

## Workflow Overview

```
identify-face  →  session_id  →  advanced-lip-sync  →  task_id  →  Poll for result
```

The `session_id` binds the video to the face analysis result. Without it, lip sync generation cannot proceed.

## Video Requirements

* The video must contain **at least one clearly visible, front-facing face**
* Faces that are well-lit and without heavy obstruction produce better results
* The video must be accessible via a public URL, or use a previously generated Kling video ID (`video_id`)

## Quick Example

```bash cURL theme={null}
curl https://dayu.cdn-fly.com/kling/v1/videos/identify-face \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://example.com/person-speaking.mp4"
  }'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://dayu.cdn-fly.com/kling/v1/videos/identify-face",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={"video_url": "https://example.com/person-speaking.mp4"}
)

data = response.json()
session_id = data["data"]["session_id"]
face_count = len(data["data"]["face_list"])
print(f"Session ID: {session_id} ({face_count} face(s) detected)")
```

## Request Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `video_url` | string | One of the two | Public URL of the source video |
| `video_id` | string | One of the two | ID of a previously generated Kling video |

## Response

This endpoint is **synchronous** — results are returned immediately with no polling needed.

| Field | Description |
| - | - |
| `data.session_id` | Session ID to pass to the lip sync endpoint |
| `data.face_list[]` | All faces detected in the video |
| `face_list[].face_id` | Unique identifier for each face |
| `face_list[].face_rect` | Face bounding box `{x, y, width, height}` (pixels) |

When multiple people are in the video, `face_list` will contain multiple entries.

> **[Next Step: Lip Sync Generation](/en/guides/model-api/kuaishou/kling-lip-sync)**
>
> Use the session\_id to generate a lip sync video.

> **[API Reference](/en/api-reference/model-api/kuaishou/kling-identify-face)**
>
> View the interactive API documentation for Kling Face Identification.


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