{
  "Create Task": "Create Task\nPOST\n/v1/audio/video-to-audio\ncURL\nCopy\nCollapse\ncurl --request POST \\\n--url https://api-singapore.klingai.com/v1/audio/video-to-audio \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"video_url\": \"https://p1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/20fps-7s.mov\",\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, is 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\" // 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\nvideo_id\nstring\nOptional\nThe ID of the video generated by the Kling AI\nEither the video_id parameter or the video_url parameter, cannot be empty or have a value at the same time.\nOnly supports videos generated within 30 days and with a duration between 3.0s and 20.0s.\nvideo_url\nstring\nOptional\nLink for uploaded video\nEither the video_id parameter or the video_url parameter, cannot be empty or have a value at the same time.\nOnly .mp4/.mov formats are supported. File size does not exceed 100MB. Video duration between 3.0s and 20.0s.\nsound_effect_prompt\nstring\nOptional\nSound effect prompt\nCannot exceed 200 characters\nbgm_prompt\nstring\nOptional\nBGM prompt\nCannot exceed 200 characters\nasmr_mode\nboolean\nOptional\nDefault to false\nEnable ASMR mode; This mode enhances detailed sound effects and is suitable for highly immersive content scenarios\ntrue means enabled, false means disabled (default)\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nUsers can provide a customized task ID, which will not overwrite the system-generated task ID but can be used for task queries.\nPlease note that the customized task ID must be unique within a single user account.\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\nThe specific message schema of the notification can be found in Callback Protocol\nQuery Task (Single)\nGET\n/v1/audio/video-to-audio/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/audio/video-to-audio/{task_id} \\",
  "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\nvideo_id\nstring\nOptional\nThe ID of the video generated by the Kling AI\nEither the video_id parameter or the video_url parameter, cannot be empty or have a value at the same time.\nOnly supports videos generated within 30 days and with a duration between 3.0s and 20.0s.\nvideo_url\nstring\nOptional\nLink for uploaded video\nEither the video_id parameter or the video_url parameter, cannot be empty or have a value at the same time.\nOnly .mp4/.mov formats are supported. File size does not exceed 100MB. Video duration between 3.0s and 20.0s.\nsound_effect_prompt\nstring\nOptional\nSound effect prompt\nCannot exceed 200 characters\nbgm_prompt\nstring\nOptional\nBGM prompt\nCannot exceed 200 characters\nasmr_mode\nboolean\nOptional\nDefault to false\nEnable ASMR mode; This mode enhances detailed sound effects and is suitable for highly immersive content scenarios\ntrue means enabled, false means disabled (default)\nexternal_task_id\nstring\nOptional\nCustomized Task ID\nUsers can provide a customized task ID, which will not overwrite the system-generated task ID but can be used for task queries.\nPlease note that the customized task ID must be unique within a single user account.\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\nThe specific message schema of the notification can be found in Callback Protocol\nQuery Task (Single)\nGET\n/v1/audio/video-to-audio/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/audio/video-to-audio/{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, 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\"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 (seconds)\n}\n},\n\"task_result\": {\n\"videos\": [\n{\n\"id\": \"string\", // Generated video ID; globally unique",
  "Callback Protocol": "The specific message schema of the notification can be found in Callback Protocol\nQuery Task (Single)\nGET\n/v1/audio/video-to-audio/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/audio/video-to-audio/{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, 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\"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 (seconds)\n}\n},\n\"task_result\": {\n\"videos\": [\n{\n\"id\": \"string\", // Generated video ID; globally unique\n\"url\": \"string\", // URL for generating videos (To ensure information security, generated images/videos will be cleared after 30 days. Please make sure to save them promptly.)\n\"duration\": \"string\" // Total video duration, unit: s (seconds)\n}\n],\n\"audios\": [\n{\n\"id\": \"string\", // Generated audio ID; globally unique, will be cleared after 30 days\n\"url_mp3\": \"string\", // URL for generating audio in MP3 format (To ensure information security, generated audio will be cleared after 30 days. Please make sure to save them promptly.)\n\"url_wav\": \"string\", // URL for generating audio in WAV format (To ensure information security, generated audio will be cleared after 30 days. Please make sure to save them promptly.)\n\"duration_mp3\": \"string\", // Total MP3 audio duration, unit: s (seconds)\n\"duration_wav\": \"string\" // Total WAV audio duration, unit: s (seconds)\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\nOptional\nThe task ID for audio generation\nRequest path parameter, fill the value directly in the request path\nYou can choose to query by external_task_id or task_id\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\nQuery Task (List)\nGET\n/v1/audio/video-to-audio\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url 'https://api-singapore.klingai.com/v1/audio/video-to-audio?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 codes\n\"message\": \"string\", // Error information\n\"request_id\": \"string\", // Request ID, generated by the system, to track requests and troubleshoot problems"
}