{"api_id":"kling/kling-4.0/omni-video","vendor":"kling","function":"omni-video","category":"video","name":"Kling 4.0 (Omni Video)","description":"Kling 4.0 Omni: combine a prompt with reference images, videos, Elements, and voices, 3-30s at 720p or 1080p. Always generates native audio. Video inputs also bill their own seconds.","display_pricing":{"components":[{"role":"output","unit":{"type":"second","quantity":1,"included":0},"starting_at":{"spec":{"resolution":"720p","variant":"with-video-input"},"sell_usd":"0.094","micro_usd":94000},"price_tiers":[{"spec":{"resolution":"720p","variant":"with-video-input"},"sell_usd":"0.094","micro_usd":94000},{"spec":{"resolution":"1080p","variant":"with-video-input"},"sell_usd":"0.141","micro_usd":141000},{"spec":{"resolution":"720p"},"sell_usd":"0.157","micro_usd":157000},{"spec":{"resolution":"1080p"},"sell_usd":"0.235","micro_usd":235000}]}]},"call":{"method":"POST","path":"/v1/media/kling/kling-4.0/omni-video"},"input_schema":{"$defs":{"Kling4PromptContent":{"additionalProperties":false,"properties":{"type":{"const":"prompt","description":"prompt: the text prompt item; carries `text`.","title":"Type","type":"string"},"text":{"description":"Prompt text (type prompt).","maxLength":26000,"minLength":1,"title":"Text","type":"string"}},"required":["type","text"],"title":"Kling4PromptContent","type":"object"},"KlingImageElement":{"additionalProperties":false,"properties":{"type":{"const":"element","description":"element: a multi-image element registered from `frontal_image_url` and `reference_image_urls`; the prompt references it as @id.","title":"Type","type":"string"},"id":{"description":"Handle the prompt references as @id.","minLength":1,"title":"Id","type":"string"},"frontal_image_url":{"description":"Frontal image of the subject (type element): jpg/png, <=10MB, >=300px, aspect between 1:2.5 and 2.5:1.","media_kinds":["image"],"pattern":"^https?://","title":"Frontal Image Url","type":"string"},"reference_image_urls":{"description":"1-3 additional views of the same subject (type element): jpg/png, <=10MB, >=300px, aspect between 1:2.5 and 2.5:1.","items":{"media_kinds":["image"],"pattern":"^https?://","type":"string"},"maxItems":3,"minItems":1,"title":"Reference Image Urls","type":"array"}},"required":["type","id","frontal_image_url","reference_image_urls"],"title":"KlingImageElement","type":"object"},"KlingMaterialContent":{"additionalProperties":false,"properties":{"type":{"description":"first_frame, middle_frame, last_frame, refer_image, feature_video or base_video: an image or video material; carries `url` and an optional `id` handle.","enum":["first_frame","middle_frame","last_frame","refer_image","feature_video","base_video"],"title":"Type","type":"string"},"url":{"description":"Image or video URL (material types).","media_kinds":["image","video"],"pattern":"^https?://","title":"Url","type":"string"},"id":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Optional handle the prompt references as @id (material types).","title":"Id"}},"required":["type","url"],"title":"KlingMaterialContent","type":"object"},"KlingPresetElement":{"additionalProperties":false,"properties":{"type":{"const":"preset_element","description":"preset_element: an element from Kling's preset library named by `element_id`; the prompt references it as @id.","title":"Type","type":"string"},"id":{"description":"Handle the prompt references as @id.","minLength":1,"title":"Id","type":"string"},"element_id":{"description":"Id of an element in Kling's preset library (type preset_element).","minLength":1,"title":"Element Id","type":"string"}},"required":["type","id","element_id"],"title":"KlingPresetElement","type":"object"},"KlingVideoElement":{"additionalProperties":false,"properties":{"type":{"const":"video_element","description":"video_element: a video-character element registered from `video_url`; the prompt references it as @id.","title":"Type","type":"string"},"id":{"description":"Handle the prompt references as @id.","minLength":1,"title":"Id","type":"string"},"video_url":{"description":"One mp4/mov of a realistic person (type video_element), 3-8s, 1080p, 16:9 or 9:16, <=200MB. Speech in the clip becomes the element's voice.","media_kinds":["video"],"pattern":"^https?://","title":"Video Url","type":"string"}},"required":["type","id","video_url"],"title":"KlingVideoElement","type":"object"},"KlingVoiceContent":{"additionalProperties":false,"properties":{"type":{"const":"voice","description":"voice: a voice named by `voice_id`; the prompt references it as @id.","title":"Type","type":"string"},"id":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Optional handle the prompt references as @id (type voice).","title":"Id"},"voice_id":{"description":"Id of the voice to speak with (type voice).","minLength":1,"title":"Voice Id","type":"string"}},"required":["type","voice_id"],"title":"KlingVoiceContent","type":"object"}},"additionalProperties":false,"native_audio":true,"properties":{"contents":{"description":"Reference inputs: a prompt, plus images, videos, inline or preset elements and voices.","items":{"discriminator":{"mapping":{"base_video":"#/$defs/KlingMaterialContent","element":"#/$defs/KlingImageElement","feature_video":"#/$defs/KlingMaterialContent","first_frame":"#/$defs/KlingMaterialContent","last_frame":"#/$defs/KlingMaterialContent","middle_frame":"#/$defs/KlingMaterialContent","preset_element":"#/$defs/KlingPresetElement","prompt":"#/$defs/Kling4PromptContent","refer_image":"#/$defs/KlingMaterialContent","video_element":"#/$defs/KlingVideoElement","voice":"#/$defs/KlingVoiceContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/$defs/Kling4PromptContent"},{"$ref":"#/$defs/KlingMaterialContent"},{"$ref":"#/$defs/KlingImageElement"},{"$ref":"#/$defs/KlingVideoElement"},{"$ref":"#/$defs/KlingPresetElement"},{"$ref":"#/$defs/KlingVoiceContent"}]},"minItems":1,"title":"Contents","type":"array"},"duration":{"default":5,"description":"Video length in seconds.","maximum":30,"minimum":3,"title":"Duration","type":"integer"},"resolution":{"default":"720p","description":"Output resolution.","enum":["720p","1080p"],"title":"Resolution","type":"string"},"aspect_ratio":{"default":"adaptive","description":"Output aspect ratio; adaptive follows the inputs.","enum":["21:9","16:9","9:16","1:1","adaptive"],"title":"Aspect Ratio","type":"string"},"watermark":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Also return a watermarked result.","title":"Watermark"}},"required":["contents"],"title":"Kling4OmniVideoRequest","type":"object"}}