Nodes/ComfyUI-Kling-Direct/Kling Text to Video
ComfyUI Node

Kling Text to Video

Kling's flagship text-to-video, dropped straight into your ComfyUI graph

By IxMxAMAR·Created 5 months ago·Updated 2 months ago· 4
Kling Text to Video
  • auth
  • camera_control
  • video
  • video_file
  • audio
  • url
  • task_id
prompt
negative_prompt
model_namekling-v3
aspect_ratio16:9
duration5
modepro
soundtrue
cfg_scale0.50
shot_typenatural

This is the node the whole ComfyUI-Kling-Direct pack exists for: type a prompt, get a Kling video back as a tensor in your graph. Kling's weights are closed - you cannot download them, no matter how big your GPU is. The only door is their API, and this node is that door, wired so the result behaves like any other ComfyUI video: an IMAGE batch you can preview, pipe into Video to File (MP4), or feed into a local upscaler on the way out.

One thing to be clear-eyed about before you fall in love: this isn't running a model. It's an HTTP call. Your prompt, your negative prompt, and anything you reference leave your machine and hit Kling's servers, which meter every job against your credits. Per-call costs add up fast - a 5-second pro clip costs more than a std one, and video is where a session gets expensive. The community's honest take on API nodes like this is "great for the model you can't run locally, grudging about the bill." Budget accordingly.

What you actually set

The inputs that matter, in order of how often you'll touch them:

  • prompt - multiline text. This is the whole creative input. Kling's prompt syntax supports @image1 / @video1 references to attached media - that's genuinely useful on sibling nodes like Video Omni that take image sockets; on this one it applies if you've registered Kling elements upstream.
  • model_name - kling-v3 (default) is the current flagshp; kling-v2-master for the cinematic look; kling-v2-5-turbo if you want faster/cheaper drafts.
  • duration - 5, 10, or 15 seconds. Longer means more credits.
  • mode - pro (higher quality, pricier) vs std (faster, cheaper). Start with std while you're iterating on a prompt.
  • sound - boolean; Kling can generate ambient audio on the clip. Free to toggle, but it shows up in the audio output.
  • cfg_scale - 0.5 default, range 0–1. Higher = prompt sticks closer, lower = more creative. This is not the 7-ish CFG you know from SD; Kling's scale lives in this compressed range.
  • shot_type - natural / wide_angle / medium_shot / close_up. A cheap way to steer framing without camera-control plumbing.

The one optional input, camera_control, takes a KLING_CAMERA object from the pack's Camera Control or Camera Preset nodes - 15 presets like orbit_left, dolly_in, pan_right. Leave it unwired and you get the model's natural camera.

Outputs and where they go

Five outputs, and you'll use three of them. video (IMAGE) is the frames you preview and post-process. audio (AUDIO) is the soundtrack if you enabled sound. task_id is a STRING you keep if you plan to chain - it's what Video Extend and Task Status want. video_file and url are conveniences: the downloaded file path and the hosted URL, useful when you want to save without another API round-trip.

Install and first run

ComfyUI Manager → Install Custom Nodes → search "Kling Direct" → install → restart. Manual is the usual:

cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-Kling-Direct

No model files to download - the pack is stdlib plus requests/Pillow/numpy/torch/opencv-python, all already in ComfyUI. What it does need is a Kling access key + secret key from https://app.klingai.com/global/dev (this requires KYC activation on a new account). Paste them into the Kling AI Authentication node, wire its auth output in here, and you're live. You can also set KLING_ACCESS_KEY / KLING_SECRET_KEY env vars and leave the auth fields blank.

Where people get burned

  • Region mismatch. Global accounts default to the Singapore endpoint; if you signed up in China, add the Kling Region Selector between auth and this node and switch to china or us, or every call 401s.
  • Zero-credit surprise. New accounts need KYC before the API keys even work. Verify auth first with the pack's API Health Check node rather than debugging a failed video.
  • The bill. It's metered, it's per call, and 15-second pro clips stack up. Treat every generation like it costs real money, because it does.
CategoryKling AI/Video

Inputs (11)

NameTypeDefaultDescription
authKLING_AUTH
promptSTRINGText description of the video to generate. Supports @image1 and @video1 references.
negative_promptSTRINGThings to avoid in the generated video.
model_nameCOMBOkling-v3Kling model version. v3 is latest, v2-master for cinematic quality.
aspect_ratioCOMBO16:9Output video aspect ratio.
durationCOMBO5Video duration in seconds.
modeCOMBOproGeneration mode: 'pro' for higher quality, 'std' for faster/cheaper.
soundBOOLEANtrueEnable AI-generated sound effects and ambient audio.
cfg_scaleFLOAT0.500–1Classifier-free guidance scale. Higher = more prompt adherence, lower = more creative.
shot_typeCOMBOnaturalCamera shot framing style.
camera_controloptKLING_CAMERA

Outputs (5)

NameTypeDescription
videoIMAGE
video_fileSTRING
audioAUDIO
urlSTRING
task_idSTRING