{
  "Create Task": "Create Task\nPOST\n/v1/videos/image2video\ncURL\nCopy\nCollapse\ncurl --location --request POST 'https://api-singapore.klingai.com/v1/videos/image2video' \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\"model_name\": \"kling-v2-6\",\n\"image\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-2.png\",\n\"image_tail\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-1.png\",\n\"prompt\": \"Camera zooms out, the girl smiles\",\n\"negative_prompt\": \"\",\n\"duration\": \"5\",\n\"mode\": \"pro\",\n\"sound\": \"off\",\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. Please use this field to specify the model version in the future.\nWe maintain backward compatibility. If you continue using the original model field, it will not affect API calls and will be equivalent to the default behavior when model_name is empty (i.e., calling the V1 model).\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authentication\nRequest Body\nmodel_name\nstring\nOptional\nDefault to kling-v1\nModel Name\nEnum values：\nkling-v1\nkling-v1-5\nkling-v1-6\nkling-v2-master\nkling-v2-1\nkling-v2-1-master\nkling-v2-5-turbo\nkling-v2-6\nkling-v3\nimage\nstring\nOptional\nReference Image\nSupports image Base64 encoding or image URL (ensure accessibility)\nImportant: When using Base64, do NOT add any prefix like data:image/png;base64,. Submit only the raw Base64 string.\nCorrect Base64 format:\niVBORw0KGgoAAAANSUhEUgAAAAUA...\nIncorrect Base64 format (with data: prefix):\ndata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...\nSupported image formats: .jpg / .jpeg / .png\nFile size: ≤10MB, dimensions: min 300px, aspect ratio: 1:2.5 ~ 2.5:1\nAt least one of image or image_tail must be provided; both cannot be empty",
  "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. Please use this field to specify the model version in the future.\nWe maintain backward compatibility. If you continue using the original model field, it will not affect API calls and will be equivalent to the default behavior when model_name is empty (i.e., calling the V1 model).\nRequest Header\nContent-Type\nstring\nRequired\nDefault to application/json\nData Exchange Format\nAuthorization\nstring\nRequired\nAuthentication information, refer to API authentication\nRequest Body\nmodel_name\nstring\nOptional\nDefault to kling-v1\nModel Name\nEnum values：\nkling-v1\nkling-v1-5\nkling-v1-6\nkling-v2-master\nkling-v2-1\nkling-v2-1-master\nkling-v2-5-turbo\nkling-v2-6\nkling-v3\nimage\nstring\nOptional\nReference Image\nSupports image Base64 encoding or image URL (ensure accessibility)\nImportant: When using Base64, do NOT add any prefix like data:image/png;base64,. Submit only the raw Base64 string.\nCorrect Base64 format:\niVBORw0KGgoAAAANSUhEUgAAAAUA...\nIncorrect Base64 format (with data: prefix):\ndata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...\nSupported image formats: .jpg / .jpeg / .png\nFile size: ≤10MB, dimensions: min 300px, aspect ratio: 1:2.5 ~ 2.5:1\nAt least one of image or image_tail must be provided; both cannot be empty\nSupport varies by model version and video mode. See Capability Map for details.\nimage_tail\nstring\nOptional\nReference Image - End frame control\nSupports image Base64 encoding or image URL (ensure accessibility)\nImportant: When using Base64, do NOT add any prefix like data:image/png;base64,. Submit only the raw Base64 string.\nSupported image formats: .jpg / .jpeg / .png\nFile size: ≤10MB, dimensions: min 300px\nAt least one of image or image_tail must be provided; both cannot be empty\nimage_tail, dynamic_masks/static_mask, and camera_control are mutually exclusive - only one can be used at a time\nSupport varies by model version and video mode. See Capability Map for details.\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",
  "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\nMust be unique within a single user account\nScenario invocation examples\nImage to video with multi-shot\ncurl --location 'https://xxx/v1/videos/image2video' \\\n--header 'Authorization: Bearer xxx' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-v3\",\n\"image\": \"xxx\",\n\"prompt\": \"\",\n\"multi_shot\": \"true\",\n\"shot_type\": \"customize\",\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\"negative_prompt\": \"\",\n\"duration\": \"15\",\n\"mode\": \"pro\",\n\"sound\": \"on\",\n\"callback_url\": \"\",\n\"external_task_id\": \"\"\n}'\nImage to video with element\ncurl --location 'https://api-singapore.klingai.com/v1/images/generations' \\\n--header 'Authorization: Bearer xxx' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-v3\",\n\"prompt\": \"Merge all the characters from the images into the <<<object_2>>> diagram\",\n\"element_list\": [\n{\n\"element_id\": \"160\"\n},\n{\n\"element_id\": \"161\"\n},\n{\n\"element_id\": \"159\"\n}\n],\n\"image\": \"xxx\",\n\"resolution\": \"2k\",\n\"n\": \"9\",\n\"aspect_ratio\": \"3:2\",\n\"external_task_id\": \"\","
}