Skip to content

Lip-sync face identification

Lip sync (`kling-lip-sync`) step one: identify faces in the media and get a session ID and face IDs.

POST/v1/kling/faces

Synchronous endpoint, billed per call. The result contains a session ID and face IDs, valid for 24 hours. In step two, put them in extra.session_id and extra.face_choose (exactly one item, with face_id and sound_file) of Submit video task; see Lip sync for the flow.

The request body accepts only a videos array; each item has either url or file_id, not both, following the same rules as Media locators.

Headers

Authorization:requiredstring

Bearer sk-…: an API key created in the console under API keys; its group must include the requested model

Body parametersJSON

videos:requiredarray of object

Media to identify faces in; at least one item

Items≥ 1

Returns

200Identification result JSON with a session ID and face IDs (valid for 24 hours)

application/json Face identification result

Errors

400Invalid request, not billed. Messages: request body does not match the JSON contract: …: invalid JSON, a field outside the table, or a second JSON value after the request body videos is required and must contain at least one item videos[<index>] must provide exactly one of url or file_id videos[<index>].url must be a publicly accessible absolute http(s) URL
401Missing, invalid or expired API key (missing_api_key / invalid_api_key / api_key_expired)

Related