Kling Lip Sync API
Advanced lip-sync for videos. Identify faces then sync them with custom audio tracks.
Quick Start
Authentication
Add Authorization header with Bearer token to all requests:
Authorization: Bearer YOUR_API_KEY
Available Models
| Model | API Name | Features | Price (85% off) |
|---|---|---|---|
| Face Recognition | kling-identify-face | Detect faces in video, returns session_id + face_id | $0.0007/call |
| Advanced Lip Sync | kling-advanced-lip-sync | Sync faces with audio, multi-face support | $0.0063/5s |
Pricing (85% off)
| Operation | Price |
|---|---|
| Face Recognition (kling-identify-face) | $0.0007/call |
| Advanced Lip Sync (kling-advanced-lip-sync) | $0.0063/5s |
Endpoints
/api/v1/audio/generationsCreate a face recognition or lip sync task. Set model to "kling-identify-face" or "kling-advanced-lip-sync".
/api/v1/audio/generations?task_id=xxxQuery task status and retrieve results
Two-Step Workflow
Lip sync requires two API calls. First, submit your video to "kling-identify-face" — this returns a session_id and a list of detected faces with their face_id values. Then, submit a second request to "kling-advanced-lip-sync" with the session_id, the face_id(s) you want to sync, and the corresponding audio source.
Request Parameters
Step 1 — Face Recognition (kling-identify-face)
Submit a video to identify faces. Returns a session_id and list of face objects with face_id values.
Step 2 — Advanced Lip Sync (kling-advanced-lip-sync)
Use the session_id and face_id values from step 1 to apply lip sync with custom audio.
face_choose Object
Code Examples
# Step 1: Identify faces in the video
curl -X POST https://apimodels.app/api/v1/audio/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-identify-face",
"video_url": "https://example.com/video.mp4"
}'Response Format
Create Task Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "pending",
"model": "kling-identify-face"
}
}Face Recognition — Success
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "completed",
"model": "kling-identify-face",
"faceData": {
"session_id": "session_abc123",
"face_list": [
{
"face_id": "face_001",
"face_reference": "https://...face_thumbnail.jpg"
}
]
}
}
}Lip Sync — Success
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "completed",
"model": "kling-advanced-lip-sync",
"resultUrls": ["https://...lip_synced_video.mp4"]
}
}Failed Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "failed",
"failMsg": "Face detection failed: no faces found"
}
}Task States
pendingTask queued, waiting to processprocessingTask is being executedcompletedTask completed successfullyfailedTask failedError Codes
400Bad Request - Missing or invalid parameters401Unauthorized - Invalid API key402Payment Required - Insufficient credits404Not Found - Task ID not found500Internal Server ErrorImportant Notes
- *Two-step process: always run face recognition first to get session_id
- *session_id and face_id from step 1 are required for step 2
- *face_choose supports multiple faces — each with independent audio and timing
- *Results are stored for 7 days, download the video promptly
- *Lip sync pricing is $0.0063 per 5s segment of the output video
- *Poll every 5-10 seconds to check task status