{
  "Create Task": "Create Task\nPOST\n/v1/videos/omni-video\ncURL\nCopy\nCollapse\ncurl --request POST \\\n--url https://api-singapore.klingai.com/v1/videos/omni-video \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-video-o1\",\n\"prompt\": \"Make the person in <<<image_1>>> wave to the camera\",\n\"image_list\": [\n{\n\"image_url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-1.png\"\n}\n],\n\"duration\": \"5\",\n\"mode\": \"pro\",\n\"aspect_ratio\": \"16:9\",\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, is used for tracking requests and troubleshooting\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}\nThe Omni model can achieve various capabilities through Prompt with elements, images, videos, and other content.\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-video-o1\nModel Name\nEnum values：\nkling-video-o1\nkling-v3-omni\nmulti_shot\nboolean\nOptional\nDefault to false\nWhether to generate multi-shot video.\nWhen true: the prompt parameter is invalid, and it does not support setting the start & end frames to generate videos\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\nText prompt words, which can include positive and negative descriptions.",
  "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}\nThe Omni model can achieve various capabilities through Prompt with elements, images, videos, and other content.\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-video-o1\nModel Name\nEnum values：\nkling-video-o1\nkling-v3-omni\nmulti_shot\nboolean\nOptional\nDefault to false\nWhether to generate multi-shot video.\nWhen true: the prompt parameter is invalid, and it does not support setting the start & end frames to generate videos\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\nText prompt words, which can include positive and negative descriptions.\nThe prompt words can be templated to meet different video generation needs\nMust not exceed 2,500 characters\nWhen the \"multi_shot\" parameter is set to false or when the \"multi_shot\" parameter is set to true and the \"shot-type\" parameter is set to intelligence, the current parameter must not be empty.\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\nThe support range for different model versions and video modes varies. For details, see Capability Map\nmulti_prompt\narray\nOptional\nInformation about each storyboard, such as prompts and duration.\nDefine shot sequence number, corresponding prompt and duration via index, prompt, and duration parameters.\nSupports up to 6 storyboards, minimum 1.\nMax length per storyboard content: 512.\nEach storyboard duration must not exceed total task duration and must be ≥ 1.\nSum of all storyboard durations must equal total task duration.\nWhen multi_shot is true and shot_type is customize, this parameter is required. Format:\n\"multi_prompt\":[\n{ \"index\": int, \"prompt\": \"string\", \"duration\": \"5\" },\n{ \"index\": int, \"prompt\": \"string\", \"duration\": \"5\" }\n]\nimage_list\narray\nOptional\nReference Image List, including element, scene, style reference images.\nIncluding reference images of the element, scene, style, etc., it can also be used as the start or end frame to generate videos; When generating a video as the start or end frame:\nDefine whether the image is in the first and last frames using the type parameter: first_frame is the start frame, end_frame is the end frame.\nCurrently does not support only the end frame, which means that when there is a end frame image, there must be a first frame image.\nIf the image is not the start & end frame, do not configure the type parameter.\nWhen generating a video using the first frame or the first and last frames, video editing functions cannot be used.\nLoad with key:value, details as follows:\n\"image_list\":[",
  "Callback Protocol": "For specific message schema, see Callback Protocol\nexternal_task_id\nstring\nOptional\nCustom task ID defined by user.\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\nThe following is an example of scene code. For more effects and prompt words, please refer to: Kling Omni Model Example\nImage/Element Reference\nImage/Element Reference：Supports reference images/elements, including characters, items, backgrounds, and more, to generate with more creativity and consistency.\ncURL\nCopy\nCollapse\ncurl --location 'https://api-singapore.klingai.com/v1/videos/omni-video' \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-video-o1\",\n\"prompt\": \"<<<image_1>>> strolling through the streets of Tokyo, encountered <<<element_1>>> and <<<element_2>>>, and jumped into the arms of <<<element_2>>>. The video style matches that of <<<image_2>>>\",\n\"image_list\": [\n{\n\"image_url\": \"xxxxx\"\n},\n{\n\"image_url\": \"xxxxx\"\n}\n],\n\"element_list\": [\n{\n\"element_id\": long\n},\n{\n\"element_id\": long\n}\n],\n\"mode\": \"pro\",\n\"aspect_ratio\": \"1:1\",\n\"duration\": \"7\"\n}'\nTransformation\nInput-based Modification: Supports Inpainting/outpainting, or changing shot compositions or angles. It also supports localized or full-scale adjustments, such as modifying/swapping subjects, backgrounds, partial areas, styles, colors, weather, and more.\ncURL\nCopy\nCollapse\ncurl --location 'https://api-singapore.klingai.com/v1/videos/omni-video' \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-video-o1\",\n\"prompt\": \"Put the crown from <<<image_1>>> on the girl in blue from <<<video_1>>>.\",\n\"image_list\": [\n{\n\"image_url\": \"xxx\"\n}\n],\n\"video_list\": [\n{\n\"video_url\":\"xxxxxxxx\",\n\"refer_type\":\"base\",\n\"keep_original_sound\":\"yes\"\n}\n],\n\"mode\": \"pro\"\n}'\nVideo Reference\nVideo Reference: Supports using reference video content to generate previous or next shots within the same context or set. It can also reference video actions or camera movements for generation.\ncURL\nCopy\nCollapse\ncurl --location 'https://api-singapore.klingai.com/v1/videos/omni-video' \\\n--header 'Authorization: Bearer <token>' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\"model_name\": \"kling-video-o1\",\n\"prompt\": \"Referring to the camera movement style in <<<video_1>>>, generate a video: <<<element_1>>> and <<<element_2>>> strolling through the streets of Tokyo, encountering <<<image_1>>> by chance.\",\n\"image_list\": [\n{\n\"image_url\": \"xxx\"\n}"
}