⌘K

Kirin Identify Face

kirin_identify_face

Identify whether the video is suitable for lip-sync service.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID for the request

Options: kirin_identify_face


video_id string

Video ID

Used to specify the video and determine whether the video is available for lip-sync service

Either video_id or video_url must be provided, but not both at the same time


video_url string

URL to retrieve the uploaded video

Used to specify the video and determine whether the video is available for lip-sync service

Either video_id or video_url must be provided, but not both at the same time

Video requirements:
Supported formats: .mp4, .mov
File size: max 100MB
Duration: 2 to 60 seconds
Resolution: only 720p and 1080p supported
Dimensions: width and height between 512px and 2160px

The system will validate the video content, and will return an error code if there are any issues


Polling

Since face identification takes time, you need to poll the task status after creation

The initial response returns the task ID and initial status. The actual generation results must be obtained through polling the task status endpoint

Response Format

error object

Error information. Only present when status is failed.

code string

Error code

error_message string

Detailed error message


output array

Generation results. Only present when status is completed.

content array

List of generated content

text string

JSON string containing face identification results:

code: Error code, see Error Codes for details
message: Error message
request_id: Request ID, system generated for tracking and troubleshooting
data.session_id: Session ID, generated based on video initialization task, does not change with edit selection, valid for 24 hours
data.final_unit_deduction: Final credit deduction amount for the task
data.face_data: Array of detected faces
data.face_data[].face_id: Face ID in the video; same face with gap over 1 second is treated as different ID
data.face_data[].face_image: Screenshot URL of the face from video
data.face_data[].start_time: Start time of lip-sync available interval for this face, can be used as optimal start time
data.face_data[].end_time: End time of lip-sync available interval; note: may have millisecond-level error, slightly longer than actual end point

type string

Resource type, text for this model

url string

URL (empty for this model)


usage object

Usage statistics. Only present when status is completed.

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information


Error Codes

Error CodeDescription
014002095Internal generation error
014002096Result parsing exception
014002097HTTP error response
014002099Sync generation exception