{"openapi":"3.0.2","info":{"title":"kling/kling-video-o1","description":"The request body Comfy Router accepts for the model \"kling/kling-video-o1\", and the response body it returns. The INPUT schema is the same schema the server validates a call against before it reaches the provider, so what is published and what is enforced cannot differ. `x-comfy-router-input-modalities` records the media kinds the model is documented to accept; the request schema is shared across sibling models and may admit media kinds this model ignores. The OUTPUT schema describes the provider's native result document exactly as Router returns it: Router does not validate, narrow or re-envelope the response, so the output schema is descriptive rather than enforced, and Comfy owns no output shape of its own.","version":"d92e3426408c"},"paths":{"/v2/models/kling/kling-video-o1":{"post":{"operationId":"runRouterModel","summary":"Run kling/kling-video-o1 synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/KlingOmniVideoInputs"},{"properties":{"mode":{"default":"pro","description":"Video generation mode. std: Standard Mode, generating 720P videos, cost-effective. pro: Professional Mode, generating 1080P videos, higher quality video output.","enum":["pro","std"],"type":"string"}},"type":"object"}],"description":"Request body for a Kling omni-video generation on Comfy Router. `model_name` is filled from the request path.","example":{"aspect_ratio":"16:9","duration":"5","mode":"pro","prompt":"A paper boat drifting down a rain-soaked street at dusk."}}}}},"responses":{"200":{"description":"OK - the model's native JSON output, returned unchanged; the schema describes the provider's terminal result document as Router returns it.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/KlingQueryTaskResponse"}],"description":"Comfy Router output schema for the Kling v1 VIDEO models: the terminal `GET /v1/videos/{operation}/{id}` task-query document, forwarded unchanged. Every Kling v1 operation is SUBMIT-AND-POLL, each polled on `\u003csubmit path\u003e/:id` — the operations this component covers, `/v1/videos/text2video`, `/v1/videos/omni-video` and `/v1/videos/avatar/image2video`, and the lip-sync sibling documented separately alike — and Router polls on the caller's behalf, so the body a caller receives is the finished task rather than the `{code, message, request_id, data.task_id}` handle the underlying `/proxy/kling/*` submit answers with.\nThe generated video's download URL is at `data.task_result.videos[].url`. Read the ELEMENT field, not the `videos` container: `KlingVideoResult` is `{id, url, watermark_url, duration}`, so a one-element list carrying an id and a duration and no URL is a non-empty array holding nothing playable. `data.task_result.videos[].watermark_url` is the same asset under Kling's hotlink-protection form and counts as a result; `routerpollstate.classifyKling` draws exactly that line, and a `succeed` carrying neither is `success_without_output` rather than a finished generation.\n`data.task_status` is Kling's own four-value vocabulary — `submitted`, `processing`, `succeed`, `failed` — and the terminal success spells it `succeed`, NOT `succeeded`. The `kling/kling-3.0-turbo` sibling (`KlingV2RouterOutput`) says `succeeded` and carries an entirely different document; the two vocabularies are deliberately not folded together.\nThe operations share this component because they share this document, and the ids are grouped by operation in the list above: text2video is the family's primary and admits every create-task id, so `kling/kling-v3-omni` and `kling/kling-video-o1` are the pair that resolves onto omni-video. The last id is a route-slug model — `kling/videos-avatar-image2video`, the only id on its own operation. Its document is typed separately in the v1 contract (`KlingAvatarResponse`) but declares the same property set as `KlingQueryTaskResponse`, envelope and `data.task_result.videos[]` leaf alike, which is why it is documented here rather than as a near-identical component of its own. Its route-slug sibling is NOT: `kling/videos-lip-sync` answers a strictly NARROWER envelope and is authored by `KlingLipSyncRouterOutput`. `kling/videos-avatar-image2video` publishes its own example, on its own model page; the five generation-id pages carry the shared text2video one.","example":{"code":0,"data":{"created_at":1798761600000,"task_id":"kling-task-1a2b3c4d5e6f","task_result":{"videos":[{"duration":"5","id":"kling-video-6f5e4d3c2b1a","url":"https://example.invalid/kling/kling-v2-5-turbo/generated.mp4"}]},"task_status":"succeed","task_status_msg":"","updated_at":1798761840000},"message":"SUCCEED","request_id":"9f2c1a04-7b6e-4d38-8a51-3c0e7d9b2f46"}}}}}}}}},"components":{"schemas":{"KlingOmniVideoInputs":{"description":"Request body for a Kling omni-video generation. The `example` below is the COMFY ROUTER form and deliberately omits `model_name`, which Router fills from the `{model}` path segment; a direct v1 call to POST /proxy/kling/v1/videos/omni-video may add it (the proxy defaults an absent one to kling-video-o1). One example cannot serve both spellings, so the omitting form is the only one valid on both Router routes.","example":{"aspect_ratio":"16:9","duration":"5","prompt":"A paper boat drifting down a rain-soaked street at dusk."},"properties":{"aspect_ratio":{"description":"The aspect ratio of the generated video frame (width:height). Required when first-frame reference or video editing features are not used.","enum":["16:9","9:16","1:1"],"type":"string"},"callback_url":{"description":"The callback notification address for the result of this task. If configured, the server will actively notify when the task status changes. Ignored: comfy-api drops this field before forwarding; Comfy Router polls on your behalf.","format":"uri","type":"string"},"duration":{"default":"5","description":"Video Length in seconds. When using video editing function (refer_type: base), output duration is the same as input video and this parameter is invalid.","enum":["3","4","5","6","7","8","9","10","11","12","13","14","15"],"type":"string"},"element_list":{"description":"Reference Element List based on element ID configuration.","items":{"properties":{"element_id":{"description":"Element ID","format":"int64","type":"integer"}},"required":["element_id"],"type":"object"},"type":"array"},"external_task_id":{"description":"Customized Task ID. Must be unique within a single user account. Ignored: comfy-api drops this field before forwarding; Comfy Router polls on your behalf.","type":"string"},"image_list":{"description":"Reference Image List. Can include reference images of the element, scene, style, etc., or be used as the first or last frame to generate videos.","items":{"properties":{"image_url":{"description":"Image Base64 encoding or image URL (ensure accessibility). Supported formats include .jpg/.jpeg/.png. File size cannot exceed 10MB. Width and height dimensions shall not be less than 300px, aspect ratio between 1:2.5 ~ 2.5:1.","type":"string"},"type":{"description":"Whether the image is in the first or last frame. first_frame is the first frame, end_frame is the last frame. Currently does not support only the end frame.","enum":["first_frame","end_frame"],"type":"string"}},"type":"object"},"type":"array"},"model_name":{"description":"Model name. Omit it or send null when using Comfy Router; the model is selected by the request path. A supplied name must match that path.","nullable":true,"type":"string"},"multi_prompt":{"description":"Information about each storyboard, such as prompts and duration. Supports up to 6 storyboards, with a minimum of 1. Required when multi_shot is true and shot_type is customize.","items":{"properties":{"duration":{"description":"Duration of this storyboard in seconds. Must not exceed total task duration and must not be less than 1. Sum of all storyboard durations equals total task duration.","type":"string"},"index":{"description":"Shot sequence number","type":"integer"},"prompt":{"description":"Prompt word for this storyboard. Maximum length 512 characters.","maxLength":512,"type":"string"}},"type":"object"},"maxItems":6,"minItems":1,"type":"array"},"multi_shot":{"default":false,"description":"Whether to generate multi-shot video. When true, the prompt parameter is invalid. When false, the shot_type and multi_prompt parameters are invalid.","type":"boolean"},"prompt":{"description":"Text prompt words, which can include positive and negative descriptions. Must not exceed 2,500 characters. Can specify elements, images, or videos in the format \u003c\u003c\u003c\u003e\u003e\u003e such as \u003c\u003celement_1\u003e\u003e, \u003c\u003c\u003cimage_1\u003e\u003e\u003e, \u003c\u003c\u003cvideo_1\u003e\u003e\u003e.","maxLength":2500,"type":"string"},"shot_type":{"description":"Storyboard method. Required when the multi_shot parameter is set to true.","enum":["customize","intelligence"],"type":"string"},"sound":{"default":"off","description":"Whether sound is generated simultaneously when generating videos.","enum":["on","off"],"type":"string"},"video_list":{"description":"Reference Video list. Can be used as a reference video for feature or as a video to be edited, with the default being the video to be edited.","items":{"properties":{"keep_original_sound":{"description":"Whether to keep the video original sound. yes indicates retention, no indicates non retention.","enum":["yes","no"],"type":"string"},"refer_type":{"description":"Reference video type. feature is the feature reference video, base is the video to be edited.","enum":["feature","base"],"type":"string"},"video_url":{"description":"URL of uploaded video. Only .mp4/.mov formats are supported. Duration between 3-10 seconds. Resolution must be between 720px and 2160px. Frame rates of 24-60 fps supported. Only 1 video can be uploaded, with size not exceeding 200MB.","type":"string"}},"required":["video_url"],"type":"object"},"maxItems":1,"type":"array"},"watermark_info":{"description":"Whether to generate watermarked results simultaneously. Custom watermark is not supported at this time.","properties":{"enabled":{"description":"true means generate watermark, false means do not generate.","type":"boolean"}},"type":"object"}},"type":"object"},"KlingQueryTaskResponse":{"properties":{"code":{"description":"Error code","type":"integer"},"data":{"properties":{"created_at":{"description":"Task creation time, Unix timestamp in milliseconds","type":"integer"},"final_unit_deduction":{"description":"The deduction units of task","type":"string"},"task_id":{"description":"Task ID","type":"string"},"task_info":{"properties":{"external_task_id":{"type":"string"}},"type":"object"},"task_result":{"properties":{"videos":{"items":{"$ref":"#/components/schemas/KlingVideoResult"},"type":"array"}},"type":"object"},"task_status":{"$ref":"#/components/schemas/KlingTaskStatus"},"task_status_msg":{"description":"Task status information, displaying the failure reason when the task fails","type":"string"},"updated_at":{"description":"Task update time, Unix timestamp in milliseconds","type":"integer"},"watermark_info":{"properties":{"enabled":{"type":"boolean"}},"type":"object"}},"type":"object"},"message":{"description":"Error message","type":"string"},"request_id":{"description":"Request ID","type":"string"}},"type":"object"},"KlingTaskStatus":{"description":"Task Status","enum":["submitted","processing","succeed","failed"],"type":"string"},"KlingVideoResult":{"properties":{"duration":{"description":"Total video duration in seconds","type":"string"},"id":{"description":"Generated video ID","type":"string"},"url":{"description":"URL for generated video","format":"uri","type":"string"},"watermark_url":{"description":"URL for generated video with watermark, hotlink protection format","format":"uri","type":"string"}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"kling/kling-video-o1","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text","image","video"],"x-comfy-router-output-modalities":["video"]}
