Nodes/ComfyUI-Kie-API/KIE Kling 3.0 (Video)
ComfyUI Node

KIE Kling 3.0 (Video)

Kling 3.0 in ComfyUI, with multi-shot storytelling

By gateway·Created 9 months ago·Updated 4 months ago· 39
KIE Kling 3.0 (Video)
  • first_frame
  • last_frame
  • element
  • elements
  • kling_data
  • video
modestd
aspect_ratio1:1
duration5
multi_shotsfalse
prompt
shots_textmulti-prompt section: shot 1 | 4 seconds | Wide cinematic opening with @element_name shot 2 | 3 seconds | Medium tracking shot with @element_name shot 3 | 3 seconds | Close-up emotional finale with @element_name
soundtrue
logtrue

Kling 3.0 is Kuaishou's video model, and it's closed - no weights, no local run. If you want it inside a ComfyUI graph, you're going through somebody's API. This node is the "somebody": it's the flagship video node in the gateway/ComfyUI-Kie-API pack, and it lets you feed Kling 3.0 a text prompt, optional start/end frames, and even named character references, then pull a finished mp4 back into ComfyUI as a VIDEO output.

The headline feature is multi-shot mode. Kling 3.0 can chain several shots into one clip up to 15 seconds, which is rare among API video models - most of them cap you at one 5–10 second burst. That's the reason to reach for this node instead of the simpler Kling 2.6 ones in the same pack.

Read the warning first: the README flags this node as experimental, "not production-ready yet." It's the developer's active work-in-progress, and Kling 3.0 burns through credits faster than the cheaper video models. If you care about your balance, use the pack's preflight node first (see below).

How it works

Under the hood this is a thin HTTP client for the Kie.ai createTask API. It uploads your frames, submits the request with the mode, aspect ratio, and prompt you picked, then polls the job every 10 seconds until it's done (with a 2000-second timeout, because API video is slow) and downloads the result to a temp mp4. Nothing runs locally - no model download, no GPU load, just your API key and Kie's credit balance.

The interesting part is how single-shot and multi-shot diverge:

  • Single-shot (multi_shots=false): the prompt field is used, and you can wire both first_frame and last_frame for start/end-frame control. sound toggles audio on or off.
  • Multi-shot (multi_shots=true): prompt is ignored in favor of shots_text, which holds one line per shot in label | duration | prompt format:
shot 1 | 4 seconds | Wide cinematic opening with @hero
shot 2 | 3 seconds | Medium tracking shot of @hero running
shot 3 | 3 seconds | Close-up emotional finale with @hero

In multi-shot mode the node sums your per-shot durations into the total payload duration, forces sound on (endpoint requirement), and invalidates last_frame. Keep the total between 3 and 15 seconds.

The inputs that actually matter

  • mode - std or pro. Pro is pricier and (usually) better.
  • duration - single-shot only: 3 to 15 seconds.
  • multi_shots - the mode switch; flip this before you bother writing shots_text.
  • first_frame - wire an IMAGE here when your prompt references elements; the KIE API requires image URLs for element-referenced prompts.
  • element / elements - single or batched named references (build them with KIE_KlingElements and KIE_KlingElementsBatch), then reference them in prompts as @name. Element names are letters, numbers, _ and - only - no spaces, or the reference silently won't match.

There's also a kling_data input that accepts a KIE_KLING3_REQUEST payload straight from the pack's preflight node. When it's connected, it overrides everything else - handy once you've validated a payload and want to re-run it exactly.

Output: a single video (VIDEO type) that wires into any video saver, typically SaveVideo.

Install and first run

The pack is pure API glue - no model downloads, no heavy Python deps, nothing to unzip. Install via ComfyUI Manager (search "ComfyUI-Kie-API") or:

cd ComfyUI/custom_nodes
git clone https://github.com/gateway/ComfyUI-Kie-API

Restart ComfyUI, then drop your Kie.ai API key into the config file:

cp config/kie_key.example.txt config/kie_key.txt
# paste your key into config/kie_key.txt

Run the "Get Remaining Credits" node first to confirm the key works.

Where people get burned

  • Credits. Kling 3.0 is the expensive kid on the block. The README and node docs both say it: validate with KIE Kling 3.0 Preflight before spending generation credits on a typo.
  • Element prompts without a first frame. If your prompt says @name but you didn't connect first_frame, the request may fail or drop the element - the KIE API wants image URLs in that case.
  • Long jobs timing out. Some Kling 3.0 jobs take a couple of minutes. If a run "fails" suspiciously fast, check https://kie.ai/logs - the job history there is the ground truth, and a job can finish fine after the node gave up waiting.
Categorykie/api

Inputs (13)

NameTypeDefaultDescription
modeCOMBOstd2 options: std, pro
aspect_ratioCOMBO1:13 options: 1:1, 9:16, 16:9
durationCOMBO513 options: 3, 4, 5, 6, 7, 8, +7
multi_shotsBOOLEANfalse
promptSTRING
shots_textoptSTRINGmulti-prompt section: shot 1 | 4 seconds | Wide cinematic opening with @element_name shot 2 | 3 seconds | Medium tracking shot with @element_name shot 3 | 3 seconds | Close-up emotional finale with @element_name
first_frameoptIMAGE
last_frameoptIMAGE
soundoptBOOLEANtrue
elementoptKIE_ELEMENT
elementsoptKIE_ELEMENTS
kling_dataoptKIE_KLING3_REQUEST
logoptBOOLEANtrue

Outputs (1)

NameTypeDescription
videoVIDEO