Skip to content
API Reference

Face Recognition

The preparation step for Lip-Sync: it finds the faces in a video that a lip-sync task can attach audio to, and returns a session_id for the next call.

POST https://llm.siraya.ai/v1/avatar/identify-face

Synchronous: the faces come back on this response — no polling.

Supported Models

Model ID Description
kling-face-recognition Face detection for lip-sync

Request

Field Type Required Details
model string Yes kling-face-recognition
video_url string Yes mp4/mov, ≤100MB, duration 2–60 s, height 512–2160 px — full input rules in Kling's face recognition reference

Always send a video_url; the video_id option for videos Kling generated itself is not exposed.

Example

curl https://llm.siraya.ai/v1/avatar/identify-face \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "kling-face-recognition",
    "video_url": "https://your-domain.com/source.mp4"
  }'

Response

{
    "session_id": "vsess_l8mRjYZaQPuBGU0dDe7P78eLCt42anWG1wC382APFKHhL0Jx...",
    "faces": [
        {
            "face_id": "-1",
            "face_image": "https://.../face.jpg?Expires=...",
            "start_time": 0,
            "end_time": 5300
        }
    ]
}
Field Meaning
session_id The platform's session handle (vsess_…). Pass it to lip-sync as-is; it stays valid while you select faces
faces[] One entry per detected face: face_id, a crop image, and the millisecond range the face appears in

Errors

A video with no person in it returns 400 with the upstream message (The model did not detect a human); a video under 512 px tall likewise (The video height should not be less than 512px…).

See also the shared errors and unsupported parameters for the avatar family.