{
  "Parameters": "\"task_info\": { // Task creation parameters\n\"external_task_id\": \"string\" // Customer-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\nvoice_name\nstring\nRequired\nVoice Name\nThe maximum length of text content is 20 characters\nThe voices that are no longer used after creation can be deleted through the API\nvoice_url\nstring\nOptional\nThe URL of voice data file\nSupports .mp3 / .wav audio file and .mp4 / .mov video file\nThe voice needs to be clean and free of noise, with only one type of human voice present, with a duration of no less than 5 seconds and no longer than 30 seconds\nvideo_id\nstring\nOptional\nGenerated video ID, which can provide audio materials by referencing historical works\nOnly videos that meet the following conditions can be used to customize voice:\nThe video is generated on V2.6 model and the value of sound parameter is on\nThe video is generated through Avatar API\nThe video is generated through Lip-Sync API\nThe voice needs to be clean and free of noise, with only one type of human voice present, with a duration of no less than 5 seconds and no longer than 30 seconds\ncallback_url\nstring\nOptional\nThe callback notification address for the result of this task. If configured, the server will actively notify when the task status changes.\nFor specific message schema, see Callback Protocol\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nWill not overwrite system-generated task ID, but supports querying task by this ID\nPlease note that the customized task ID must be unique within a single user account.\nQuery Custom Voice (Single)\nGET\n/v1/general/custom-voices/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/general/custom-voices/{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, is 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 information, 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\"external_task_id\": \"string\" // Customer-defined task ID\n},\n\"task_result\": {\n\"voices\": [\n{\n\"voice_id\": \"string\", // Generated voice ID; globally unique\n\"voice_name\": \"string\", // Generated voice name\n\"trial_url\": \"string\", // URL for generating videos\n\"owned_by\": \"kling\" // Voice source, kling is the official voice library, and others are the creator's ID\n}\n]\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",
  "Callback Protocol": "For specific message schema, see Callback Protocol\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nWill not overwrite system-generated task ID, but supports querying task by this ID\nPlease note that the customized task ID must be unique within a single user account.\nQuery Custom Voice (Single)\nGET\n/v1/general/custom-voices/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/general/custom-voices/{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, is 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 information, 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\"external_task_id\": \"string\" // Customer-defined task ID\n},\n\"task_result\": {\n\"voices\": [\n{\n\"voice_id\": \"string\", // Generated voice ID; globally unique\n\"voice_name\": \"string\", // Generated voice name\n\"trial_url\": \"string\", // URL for generating videos\n\"owned_by\": \"kling\" // Voice source, kling is the official voice library, and others are the creator's ID\n}\n]\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\nRequired\nThe task ID of the element creation task. Request path parameter, directly fill the value in the request path.\nexternal_task_id\nstring\nOptional\nCustomized Task ID for audio generation\nThe external_task_id filled in when creating the task. You can choose to query by external_task_id or task_id\nWhen creating a task, you can choose to query by external_task_id or task_id.\nQuery Custom Voice (List)\nGET\n/v1/general/custom-voices\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/general/custom-voices?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, is 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 information, 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\"external_task_id\": \"string\" // Customer-defined task ID\n},"
}