Nodes/ComfyUI-Kie-API/KIE Kling 3.0 Preflight
ComfyUI Node

KIE Kling 3.0 Preflight

The free Kling 3.0 dry run that saves your credits

By gateway·Created 9 months ago·Updated 4 months ago· 39
KIE Kling 3.0 Preflight
  • first_frame
  • last_frame
  • element
  • elements
  • kling_data
  • payload_json
  • notes
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 generation is expensive, and the pack's own README says the Kling 3.0 video node is still experimental. Those two facts are exactly why this node exists. Preflight runs every step of a Kling 3.0 request except the one that costs money: it validates your inputs, uploads your media, builds the exact createTask payload, and hands it back to you - without submitting the job.

Think of it as the "review order" button before the "place order" button. You catch a bad aspect ratio, a mistyped element reference, or a shot list that overflows the 15-second cap while it's still free.

How it works

It takes the exact same inputs as the KIE Kling3_Video node - mode, aspect_ratio, duration, multi_shots, prompt, shots_text, first_frame, last_frame, sound, element, elements, log - and mirrors the same validation rules. The key difference is that instead of a VIDEO, you get three outputs:

  • kling_data (KIE_KLING3_REQUEST) - the validated payload object. Wire this directly into the kling_data input of KIE Kling3_Video and hit run: the generation node will execute that exact payload, ignoring its own front-panel fields.
  • payload_json (STRING) - the precise JSON that would be sent to createTask, with real upload URLs resolved. Paste it into a text viewer and you can audit every field.
  • notes (STRING) - a plain-language summary of what was validated: which mode, which frames, which elements, and what got uploaded.

One honest caveat: it still uploads your media. The payload only makes sense with real URLs, so your images do leave your machine. It just never submits the generation task, so no credits are consumed.

The multi-shot rules it enforces

Because this is the guardrail for the fancy mode, it's worth knowing what it checks:

  • Multi-shot total duration must land between 3 and 15 seconds - computed from the summed shot durations in shots_text, not from the duration dropdown.
  • last_frame is invalid in multi-shot mode.
  • Sound is forced on in multi-shot (KIE endpoint requirement).
  • @element_name references in prompts must match elements you actually provided, and element names can only contain letters, numbers, _, and -.

When to use it

  • First time with a new prompt structure. New shot list, new element set, new first frame - dry-run it once.
  • Any multi-shot run. The 3–15s total-duration trap is exactly the kind of thing you don't want to discover after the job starts and burns credits.
  • Before a production batch. If you're running the same validated workflow repeatedly, skip preflight after the first pass and chain kling_data straight into the video node.

Install and key setup

Same as every node in this pack - Manager (search "ComfyUI-Kie-API") or:

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

Restart, and put your Kie.ai API key in config/kie_key.txt (copy from config/kie_key.example.txt). No models, no GPU, no extra Python deps.

The gotcha to remember

A green preflight does not guarantee a good video. It validates that the payload is well-formed, not that Kling 3.0 will like your prompt. Element references in particular are still model-behavior territory - preflight catches structural mistakes, and the final verdict is always the rendered clip. That's the honest division of labor: this node protects your wallet from wiring errors, not from creative disappointment.

Categorykie/helpers

Inputs (12)

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
logoptBOOLEANtrue

Outputs (3)

NameTypeDescription
kling_dataKIE_KLING3_REQUEST
payload_jsonSTRING
notesSTRING