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
stringError code
error_message
stringDetailed error message
output array
Generation results. Only present when status is completed.
content
arrayList of generated content
text
stringJSON 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 pointtype
stringResource type,
textfor this modelurl
stringURL (empty for this model)
usage object
Usage statistics. Only present when status is completed.
cost
stringTotal cost in USD
discount
numberDiscount amount
metadata object
Metadata information
Error Codes
| Error Code | Description |
|---|---|
| 014002095 | Internal generation error |
| 014002096 | Result parsing exception |
| 014002097 | HTTP error response |
| 014002099 | Sync generation exception |