Kling 视频到视频
Borrow a clip's motion, direct your own video
- video_url
Kling 视频到视频 (video-to-video) is the feature-reference node. Give it a video URL and it doesn't edit that video - it borrows from it. The default prompt says it all: 参考<<<video_1>>>的运镜方式,生成一段视频 - "reference video_1's camera movement and generate a video." The output is a brand-new clip with its own subject and content, animated with the motion, direction, and general vibe of your reference. Think of it as motion transfer with an optional character on top.
Where does that get you? Two places, mostly. You have a reference clip whose camera work you love and you want a different subject performing the same moves - that's the flagship use. Or you're extending a series and want every clip to share a consistent motion signature. The usual workflow is: source a short clip (a screen recording, a scene from something you're allowed to use, a clip you made locally), drop its URL here, write a fresh prompt, and Kling does the rest.
How it works
Another OmniVideo API wrapper, same shape as the others: POST a payload to api-beijing.klingai.com/v1/videos/omni-video, poll until succeed, get a URL back. The difference is in the payload: your video goes into video_list tagged refer_type: "feature" (as opposed to "base", which is what the edit node uses), alongside keep_original_sound. You can also attach up to four 参考图 (reference images) and reference them in the prompt with <<<image_N>>>, or pass platform element IDs via 元素ID列表.
Two structural constraints worth knowing, straight from the code: the API forces sound off whenever a source video is present, and duration is capped at 10 seconds here (not 15 like the text/image nodes). The 保留原声 toggle controls whether the original audio is carried through, not whether audio is generated.
The inputs that matter
- 提示词 (Prompt) - required. Describe the new content; use
<<<video_1>>>to gesture at the reference clip. - 视频URL (Video URL) - required. A public URL to your reference video.
- 模式 (Mode) -
pro/std/4k. - 时长 (Duration) - 3–10 seconds (notice the lower ceiling), default 5.
- 画面比例 (Aspect ratio) - 16:9 / 9:16 / 1:1.
- API令牌 (API token) - the
api_tokenfrom a Kling Auth node. Required in practice; the pack errors withapi_token is requiredif you skip it. - 保留原声 (Keep original sound) -
yes/no, defaultyes.
Output: video_url (STRING) → usually into Kling 下载视频 for a real VIDEO object.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/awsl1110/ComfyUI-KlingAI
pip install -r ComfyUI-KlingAI/requirements.txt
Restart ComfyUI, or ComfyUI Manager → "ComfyUI-KlingAI". requests + PyJWT only; nothing runs locally.
Gotchas
- Your reference video must be a public URL - the cloud fetches it itself. Local paths produce an empty or broken reference.
- Don't expect a long result. 10 seconds is the hard cap, and the closer you get, the more credits and the longer the wait. Iterate at 5.
- Sound behaves in a way that surprises people: the API turns it off whenever there's a source video, so this node never generates a soundtrack, and 保留原声=yes just means the original audio (if any) is preserved.
- The reference clip leaves your machine and lands on Kuaishou's servers - same privacy trade as the whole pack. Keep references you're comfortable being hosted.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| 提示词 | STRING | 参考<<<video_1>>>的运镜方式,生成一段视频 | — |
| 视频URL | STRING | — | |
| 模式 | COMBO | 3 options: pro, std, 4k | |
| 时长 | INT | 53–10 | — |
| 画面比例 | COMBO | 16:9 | 3 options: 16:9, 9:16, 1:1 |
| API令牌opt | STRING | — | |
| 模型名称opt | COMBO | 2 options: kling-video-o1, kling-v3-omni | |
| 保留原声opt | COMBO | yes | 2 options: yes, no |
| 参考图1opt | STRING | — | |
| 参考图2opt | STRING | — | |
| 参考图3opt | STRING | — | |
| 参考图4opt | STRING | — | |
| 元素ID列表opt | STRING | — | |
| 添加水印opt | BOOLEAN | false | — |
| 回调地址opt | STRING | — | |
| 自定义任务IDopt | STRING | — | |
| 等待超时秒opt | INT | 60060–1800 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video_url | STRING | — |