{
  "Create Task": "Create Task\nPOST\n/v1/videos/text2video\ncURL\nCopy\nCollapse\ncurl --request POST \\\n--url https://api-singapore.klingai.com/v1/videos/text2video \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-v2-6\",\n\"prompt\": \"A cute little rabbit wearing glasses, sitting at a table, reading a newspaper, with a cup of cappuccino on the table\",\n\"negative_prompt\": \"\",\n\"duration\": \"5\",\n\"mode\": \"pro\",\n\"sound\": \"on\",\n\"aspect_ratio\": \"1:1\",\n\"callback_url\": \"\",\n\"external_task_id\": \"\"\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\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}\n💡\nPlease note that in order to maintain naming consistency, the original model field has been changed to model_name, so in the future, please use this field to specify the version of the model that needs to be called.\nAt the same time, we keep the behavior forward-compatible. If you continue to use the original model field, it will not have any impact on the interface call, there will not be any exception, which is equivalent to the default behavior when model_name is empty (i.e., call the V1 model).\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authorization\nRequest Body\nmodel_name\nstring\nOptional\nDefault to kling-v1\nModel Name\nEnum values：\nkling-v1\nkling-v1-6\nkling-v2-master\nkling-v2-1-master\nkling-v2-5-turbo\nkling-v2-6\nkling-v3\nmulti_shot\nboolean\nOptional\nDefault to false\nWhether to generate multi-shot video\nWhen true: the prompt parameter is invalid, and the first/end frame generation is not supported.\nWhen false: the shot_type and multi_prompt parameters are invalid\nshot_type\nstring\nOptional\nStoryboard method\nEnum values：\ncustomize\nintelligence\nWhen multi_shot is true, this parameter is required",
  "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}\n💡\nPlease note that in order to maintain naming consistency, the original model field has been changed to model_name, so in the future, please use this field to specify the version of the model that needs to be called.\nAt the same time, we keep the behavior forward-compatible. If you continue to use the original model field, it will not have any impact on the interface call, there will not be any exception, which is equivalent to the default behavior when model_name is empty (i.e., call the V1 model).\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authorization\nRequest Body\nmodel_name\nstring\nOptional\nDefault to kling-v1\nModel Name\nEnum values：\nkling-v1\nkling-v1-6\nkling-v2-master\nkling-v2-1-master\nkling-v2-5-turbo\nkling-v2-6\nkling-v3\nmulti_shot\nboolean\nOptional\nDefault to false\nWhether to generate multi-shot video\nWhen true: the prompt parameter is invalid, and the first/end frame generation is not supported.\nWhen false: the shot_type and multi_prompt parameters are invalid\nshot_type\nstring\nOptional\nStoryboard method\nEnum values：\ncustomize\nintelligence\nWhen multi_shot is true, this parameter is required\nprompt\nstring\nOptional\nPositive text prompt\n💡\nThe Omni model can achieve various capabilities through Prompt with elements, images, videos, and other content:\nSpecify elements/images/videos using <<<>>> format, e.g.: <<<element_1>>>, <<<image_1>>>, <<<video_1>>>\nFor detailed capabilities, see: KLING Omni Model User Guide, Kling VIDEO 3.0 Omni Model User Guide\nCannot exceed 2500 characters\nUse <<<voice_1>>> to specify voice, same sequence as voice_list. Up to 2 voices; when specifying voice, sound must be on. Simpler grammar is better. For example: The man <<<voice_1>>> said, \"Hello.\".\nWhen voice_list is not empty and prompt references voice ID, task is billed as \"with voice generation\".\nWhen multi_shot is false or shot_type is intelligence, this parameter must not be empty.\nThe support range for different model versions and video modes varies. For details, see Capability Map\nmulti_prompt\narray\nOptional\nEach storyboard cue can include both positive and negative descriptions\nDefine the shot sequence number, corresponding prompt word, and duration through the index, prompt, and duration parameters, where:\nSupports up to 6 storyboards, with a minimum of 1 storyboard.\nThe maximum length of the prompt for each storyboard 512 characters.\nThe duration of each storyboard should not exceed the total duration, but should not be less than 1.\nThe sum of the durations of all storyboards equals the total duration of the current task.\nLoad with key:value format as follows:\n\"multi_prompt\":[\n{\"index\":int,\"prompt\":\"string\",\"duration\":\"5\"},\n{\"index\":int,\"prompt\":\"string\",\"duration\":\"5\"}\n]\nWhen multi_shot is true and shot_type is customize, this parameter is required.\nnegative_prompt\nstring",
  "Callback Protocol": "For specific message schema, see Callback Protocol\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\nMust be unique within a single user account\nMore Scene Invocation Examples\nText To Video with Multiple Shot\ncurl --location 'https://xxx/v1/videos/text2video' \\\n--header 'Authorization: Bearer xxx' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-v3\",\n\"prompt\": \"\",\n\"multi_prompt\": [\n{\n\"index\": 1,\n\"prompt\": \"Two friends talking under a streetlight at night.  Warm glow, casual poses, no dialogue.\",\n\"duration\": \"2\"\n},\n{\n\"index\": 2,\n\"prompt\": \"A runner sprinting through a forest, leaves flying.  Low-angle shot, focus on movement.\",\n\"duration\": \"3\"\n},\n{\n\"index\": 3,\n\"prompt\": \"A woman hugging a cat, smiling.  Soft sunlight, cozy home setting, emphasize warmth.\",\n\"duration\": \"3\"\n},\n{\n\"index\": 4,\n\"prompt\": \"A door creaking open, shadowy hallway.  Dark tones, minimal details, eerie mood.\",\n\"duration\": \"3\"\n},\n{\n\"index\": 5,\n\"prompt\": \"A man slipping on a banana peel, shocked expression.  Exaggerated pose, bright colors.\",\n\"duration\": \"3\"\n},\n{\n\"index\": 6,\n\"prompt\": \"A sunset over mountains, small figure walking away.  Wide angle, peaceful atmosphere.\",\n\"duration\": \"1\"\n}\n],\n\"multi_shot\": true,\n\"shot_type\": \"customize\",\n\"duration\": \"15\",\n\"mode\": \"pro\",\n\"sound\": \"on\",\n\"aspect_ratio\": \"9:16\",\n\"callback_url\": \"\",\n\"external_task_id\": \"\"\n}'\nQuery Task (Single)\nGET\n/v1/videos/text2video/{id}\ncURL\nCopy\nCollapse\ncurl --request GET \\\n--url https://api-singapore.klingai.com/v1/videos/text2video/{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},\n\"task_result\": {"
}