{
  "Create Task": "Create Task\nPOST\n/v1/videos/advanced-lip-sync\ncURL\nCopy\nCollapse\ncurl --request POST \\\n--url https://api-singapore.klingai.com/v1/videos/advanced-lip-sync \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"session_id\": \"850508686686064678\",\n\"face_choose\": [\n{\n\"face_id\": \"0\",\n\"sound_file\": \"https://p1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/go-to-world.mp3\",\n\"sound_insert_time\": 1000,\n\"sound_start_time\": 0,\n\"sound_end_time\": 3000,\n\"sound_volume\": 2,\n\"original_audio_volume\": 2\n}\n],\n\"external_task_id\": \"\",\n\"callback_url\": \"\"\n}'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, used to track requests and troubleshoot problems\n\"data\": {\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //User-defined task ID\n},\n\"task_status\": \"string\", // Task status, Enum values: submitted, processing, succeed, failed\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, unit: ms\n\"updated_at\": 1722769557708 //Task update time, Unix timestamp, unit: ms\n}\n}\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authentication\nRequest Body\nsession_id\nstring\nRequired\nSession ID generated during the identify face API. It remains unchanged during the selection/editing process.\nface_choose\narray\nRequired\nSpecified Face for Lip-Sync\nIncludes Face ID, lip movement reference data, etc.\nCurrently only supports one person lip-sync.\n▾\nHide child attributes\nface_id\nstring\nRequired\nFace ID\nReturned by the facial recognition interface.\naudio_id\nstring\nOptional\nSound ID Generated via TTS API\nOnly supports audio generated within the last 30 days with a duration of no less than 2 seconds and no more than 60 seconds.\nEither audio_id or sound_file must be provided (mutually exclusive; cannot be empty or both populated).\nsound_file\nstring\nOptional\nSound File\nSupports Base64-encoded audio or accessible audio URL.\nAccepted formats: .mp3/.wav/.m4a/.aac (max 5MB). Format mismatches or oversized files will return error codes.\nOnly supports audio with a duration of no less than 2 seconds and no more than 60 seconds.\nEither audio_id or sound_file must be provided (mutually exclusive; cannot be empty or both populated).\nThe system will verify the audio content and return error codes if there are any problems.\nsound_start_time\nlong\nRequired\nTime point to start cropping sound",
  "Parameters": "\"task_info\": { //Task creation parameters\n\"external_task_id\": \"string\" //User-defined task ID\n},\n\"task_status\": \"string\", // Task status, Enum values: submitted, processing, succeed, failed\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, unit: ms\n\"updated_at\": 1722769557708 //Task update time, Unix timestamp, unit: ms\n}\n}\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authentication\nRequest Body\nsession_id\nstring\nRequired\nSession ID generated during the identify face API. It remains unchanged during the selection/editing process.\nface_choose\narray\nRequired\nSpecified Face for Lip-Sync\nIncludes Face ID, lip movement reference data, etc.\nCurrently only supports one person lip-sync.\n▾\nHide child attributes\nface_id\nstring\nRequired\nFace ID\nReturned by the facial recognition interface.\naudio_id\nstring\nOptional\nSound ID Generated via TTS API\nOnly supports audio generated within the last 30 days with a duration of no less than 2 seconds and no more than 60 seconds.\nEither audio_id or sound_file must be provided (mutually exclusive; cannot be empty or both populated).\nsound_file\nstring\nOptional\nSound File\nSupports Base64-encoded audio or accessible audio URL.\nAccepted formats: .mp3/.wav/.m4a/.aac (max 5MB). Format mismatches or oversized files will return error codes.\nOnly supports audio with a duration of no less than 2 seconds and no more than 60 seconds.\nEither audio_id or sound_file must be provided (mutually exclusive; cannot be empty or both populated).\nThe system will verify the audio content and return error codes if there are any problems.\nsound_start_time\nlong\nRequired\nTime point to start cropping sound\nBased on the original sound start time, the start time is 0'0\", units: ms\nThe sound before the starting point will be cropped, and the cropped sound must not be shorter than 2 seconds.\nsound_end_time\nlong\nRequired\nTime point to stop cropping sound\nBased on the original sound start time, the start time is 0'0\", units: ms\nThe sound after the end point will be cropped, and the cropped sound must not be shorter than 2 seconds.\nThe end point time shouldn't be later than the total duration of the original sound.\nsound_insert_time\nlong\nRequired\nThe time for inserting cropped sound\nBased on the original video start time, the start time is 0'0\", units: ms\nThe time range for inserting sound should overlap with the face's lip-sync time interval for at least 2 seconds.\nThe start time for inserting sound must not be earlier than the start time of the video, and the end time for inserting sound must not be later than the end time of the video.\nsound_volume\nfloat\nOptional\nDefault to 1\nVolume Controls (higher values = louder)\nValue range: [0, 2]\noriginal_audio_volume\nfloat\nOptional\nDefault to 1\nOriginal video volume (higher values = louder)\nValue range: [0, 2]\nNo effect if source video is silent.\nwatermark_info\nobject\nOptional\nWhether to generate watermarked results simultaneously\nDefined by the enabled parameter, format:\n\"watermark_info\": { \"enabled\": boolean }",
  "Callback Protocol": "For specific message schema, see Callback Protocol\nQuery Task (Single)\nGET\n/v1/videos/advanced-lip-sync/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/videos/advanced-lip-sync/{task_id} \\\n--header 'Authorization: Bearer <token>'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, used to track requests and troubleshoot problems\n\"data\": {\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_status\": \"string\", // Task status, Enum values: submitted, processing, succeed, failed\n\"task_status_msg\": \"string\", // Task status message, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.)\n\"task_info\": { //Task creation parameters\n\"parent_video\": { //Original video information\n\"id\": \"string\", // Original video ID\n\"url\": \"string\", // Original video URL\n\"duration\": \"string\" //Original video duration, unit: s\n}\n},\n\"task_result\": { //Task result\n\"videos\": [ //Generated video list\n{\n\"id\": \"string\", // Generated video ID; globally unique\n\"url\": \"string\", // URL for generating videos (Please note that for security purposes, generated images/videos will be deleted after 30 days. Please save them promptly.)\n\"watermark_url\": \"string\", // Watermarked video download URL, anti-hotlinking format\n\"duration\": \"string\" //Total video duration, unit: s\n}\n]\n},\n\"watermark_info\": {\n\"enabled\": boolean //Whether watermark is enabled\n},\n\"final_unit_deduction\": \"string\", // The deduction units of task\n\"created_at\": 1722769557708, // Task creation time, Unix timestamp, unit: ms\n\"updated_at\": 1722769557708 //Task update time, Unix timestamp, unit: ms\n}\n}\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authentication\nPath Parameters\ntask_id\nstring\nOptional\nTask ID for Video Generation - Lip-Sync. Fill the value directly in the request path.\nQuery Task (List)\nGET\n/v1/videos/advanced-lip-sync\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/videos/advanced-lip-sync?pageNum=1&pageSize=30' \\\n--header 'Authorization: Bearer <token>'\n200\nCopy\nCollapse\n{\n\"code\": 0, // Error codes; Specific definitions can be found in \"Error Code\"\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, used to track requests and troubleshoot problems\n\"data\": [\n{\n\"task_id\": \"string\", // Task ID, generated by the system\n\"task_status\": \"string\", // Task status, Enum values: submitted, processing, succeed, failed\n\"task_status_msg\": \"string\", // Task status message, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.)\n\"task_info\": { //Task creation parameters\n\"parent_video\": { //Original video information\n\"id\": \"string\", // Original video ID\n\"url\": \"string\", // Original video URL\n\"duration\": \"string\" //Original video duration, unit: s\n}\n},\n\"task_result\": { //Task result"
}