Nodes/ComfyUI API Toolkit/Kling Multi-Image to Video
ComfyUI Node

Kling Multi-Image to Video

Kling Multi-Image to Video

By IxMxAMAR·Created 7 months ago·Updated 23 days ago· 1
Kling Multi-Image to Video
  • auth
  • image_1
  • image_2
  • image_3
  • image_4
  • video
  • video_file
  • audio
  • url
  • task_id
◄prompt►
◄negative_prompt►
◄modestd►
◄duration5►
◄aspect_ratio16:9►

Most image-to-video nodes animate a frame - you hand them a start image and they push it forward. This one is different in kind. Up to four images go in as subject references, and the prompt tells the model what to do with them. It's a way to get a specific person or object into a moving shot without training anything, which is why it exists.

Under the hood it's running kling-v1-6 against /v1/videos/multi-image2video. That's an older model in Kling's line than the v2.x and 3.0 Turbo nodes elsewhere in this pack, so set expectations accordingly: you come here for the multi-reference trick, not for the best-looking frames Kling can produce.

Inputs worth setting

auth comes from the Kling AI Authentication node. prompt describes the video - the action, not the subject, since the subject arrives in the images.

image_1 is required and its tooltip contains the most important sentence on the whole node: crop to the subject first, because Kling does not crop. It won't find the person in your photo. Frame them yourself before wiring the image in. image_2 through image_4 are optional and follow the same rule - other angles, other outfits, whatever helps the model pin the identity down.

negative_prompt is a plain string of things to avoid. mode is std or pro, which is Kling's faster/cheaper versus higher-quality axis - start on std while you're iterating, because every one of these calls is billed.

duration is a two-value enum: "5" or "10" seconds. Not a slider, not an integer - you get five or ten, and nothing else. aspect_ratio gives you 16:9, 9:16 or 1:1.

Outputs

video is the actual IMAGE batch - the decoded frames, ready for a preview or a video-combine node. video_file is the filename the node saved into ComfyUI's output directory. url is the temporary Kling-hosted link, handy if you want to grab the clip elsewhere, and it won't live forever. task_id is the Kling job id, so you can find the run on their side. audio is an AUDIO stream extracted from the downloaded file with torchaudio - best-effort by design. If the clip has no audio track, or torchaudio isn't in your environment, you get a silent placeholder and a warning in the console rather than an error. Don't panic when the log line appears.

How it works

Every image is base64-encoded and posted as an image_list alongside the prompt, mode, duration and aspect ratio. Kling queues it as a task, and the node polls /v1/videos/multi-image2video with adaptive intervals - a few seconds while it's fresh, backing off to eight seconds for long jobs - printing status lines as it goes. The client's ceiling is 1200 seconds. If the task fails, the exception carries Kling's own failure reason, which is usually more informative than anything you'd infer from the graph.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
cd ComfyUI-API-Toolkit
pip install -r requirements.txt

Kling only needs requests and PyJWT. Fill in access key and secret key on the Kling AI Authentication node, or set KLING_ACCESS_KEY and KLING_SECRET_KEY in the environment; a single KLING_API_KEY also works for the newer API-key-style auth. Keys are masked in the UI and the node implements IS_CHANGED, so every queue is a real call.

Where people get burned

Uncropped photos. The number one cause of "it generated a completely different person." Crop tight to the subject.

A 10-second pro run as your first attempt. That's the most expensive configuration on the node and the one most likely to teach you nothing. Iterate on 5 seconds, std, then spend.

Expecting first-frame behaviour. This isn't an animator. If you want your exact image to be frame one, the Turbo Image to Video node is the one you want - it takes a first_frame and a single image.

Assuming video_file is a path. It's the filename; the pack writes into ComfyUI's output directory. The url output is what you'd hand to something else.

CategoryAPI Toolkit/Kling AI/Video

Inputs (10)

NameTypeDefaultDescription
authKLING_AUTH—
promptSTRINGText description of the video.
image_1IMAGESubject reference image. Crop to the subject first: Kling does not crop.
negative_promptSTRINGThings to avoid in the generated video.
modeCOMBOstdGeneration mode: 'pro' for higher quality, 'std' for faster/cheaper.
durationCOMBO5Video duration in seconds.
aspect_ratioCOMBO16:9Output video aspect ratio.
image_2optIMAGE—
image_3optIMAGE—
image_4optIMAGE—

Outputs (5)

NameTypeDescription
videoIMAGE—
video_fileSTRING—
audioAUDIO—
urlSTRING—
task_idSTRING—