Reference · Tools

Kling AI

Generate images and videos, virtual try-on, and lip sync using Kling AI API.

Action (binary) Utility v1 Binary data

The Kling AI node generates images from text or a reference image, turns text or images into video, extends and applies effects to existing clips, overlays clothing onto model photos with virtual try-on, and lip-syncs speech onto video. A typical build is producing a garment try-on shot for every product in a catalogue.

Node type
Action (binary)
Parameters
52
Outputs
Output, Error
Credentials
Kling AI API

Kling AI

Generate images and videos using Kling AI

Overview

The Kling AI tool interfaces with the Kling AI API for AI-powered media generation. It supports image generation from text prompts (with an optional reference image for image-to-image), text-to-video, image-to-video with an optional end frame, multi-image-to-video, extending an existing Kling video, single-image and dual-character video effects, lip sync onto an existing video (text-to-speech or an audio file), and virtual try-on (overlay clothing onto model images). All generation operations are asynchronous — tasks are submitted and can optionally be polled until completion, and the result media can be downloaded as binary data. Image generation and video generation use separate model dropdowns, and a Custom Model field overrides either. Authenticates with a short-lived JWT signed from the credential Access Key + Secret Key against the Kling AI REST API.

Category: Utility
Tool Name: kling_ai
Version: 1

Appearance: Icon: lucide-Video | Color: #6366F1

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Kling AI API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Imageimage
Videovideo
Virtual Try-OntryOn
Accountaccount

Operations

Which operations are offered depends on the resource you select.

OperationValueDescription
CreatecreateGenerate images from a text prompt
GetgetGet image generation task by ID
ListlistList all image generation tasks
Text to Videotext2videoGenerate video from text prompt
Image to Videoimage2videoGenerate video from an image
Lip SynclipSyncLip sync text to a video or image
Multi-Image to VideomultiImage2videoGenerate video from multiple reference images
Extend VideovideoExtendExtend/continue an existing Kling video by ID
Video EffectseffectsApply a single-image or dual-character video effect
GetgetGet video task by ID
ListlistList video tasks
CreatecreateCreate virtual try-on
GetgetGet try-on task by ID
ListlistList try-on tasks
Get Resource PackagesgetResourcePackagesGet account resource packages and costs

The first three rows belong to Image, the next eight to Video, the next three to Virtual Try-On, and the last to Account.

Parameters

List (on Image and on Virtual Try-On) takes no parameters of its own — see All Operations. Get Resource Packages also takes none: it reports the last 30 days of resource-package usage, and an upstream item can narrow that window by carrying startTime and endTime values in Unix milliseconds.

Image: Create

ParameterTypeRequiredDefaultDescription
PromptstringNoText prompt. Required by Kling for text-to-image/video and multi-image-to-video; optional for image-to-video and video extension. Supports expressions.
Negative PromptstringNoThings to exclude from the generated result. Supports expressions.
Model (image)optionsNokling-v2-1Kling image model. O1 / v3 Omni / v2.1 / latest v1 support text-to-image AND image-to-image (add a Reference Image below). Use Custom Model for anything else.
Options: kling-v1-5 (Kling v1.5, latest v1), kling-v2-1 (Kling v2.1, latest v2), kling-image-o1 (Kling Image O1), kling-v3-omni (Kling v3 Omni)
Custom Model (overrides dropdown)stringNoOptional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above.
Number of ImagesnumberNo1Number of images to generate (1-9).
Aspect RatiooptionsNo1:1The aspect ratio of the generated output.
Options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3
Reference Image Source (image-to-image)optionsNononeOptional reference image for image-to-image. Leave “None” for plain text-to-image. (Supported by v2.1 / Image O1 / v3 Omni / latest v1.)
Options: none (plain text-to-image), url, base64, binary
Reference Image URLstringNoURL of the reference image for image-to-image. (shown when Reference Image Source (image-to-image) is url)
Reference Image Base64stringNoBase64-encoded reference image for image-to-image. (shown when Reference Image Source (image-to-image) is base64)
Reference Image Binary FieldstringNodataBinary property holding the reference image for image-to-image. (shown when Reference Image Source (image-to-image) is binary)
Wait for CompletionbooleanNofalseWhether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.)
Polling Interval (ms)numberNo5000Interval in milliseconds between polling attempts. (shown when Wait for Completion is true)
Max Wait (seconds)numberNo300Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true)
Download ResultbooleanNofalseWhether to download the result media as binary data when the task completes. (shown when Wait for Completion is true)
Output Binary FieldstringNodataName of the binary property to store the downloaded result. (shown when Download Result is true)

Image: Get

ParameterTypeRequiredDefaultDescription
Task IDstringYesThe ID of the task to retrieve. Supports expressions.

Video: Text to Video

ParameterTypeRequiredDefaultDescription
PromptstringNoText prompt. Required by Kling for text-to-image/video and multi-image-to-video; optional for image-to-video and video extension. Supports expressions.
Negative PromptstringNoThings to exclude from the generated result. Supports expressions.
Model (video)optionsNokling-v2-1Kling video model. For anything else, use the Custom Model field below.
Options: kling-v1-6 (Kling v1.6, latest v1), kling-v2-1 (Kling v2.1, latest v2), kling-video-o1 (Kling Video O1), kling-v3-omni (Kling v3 Omni)
Custom Model (overrides dropdown)stringNoOptional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above.
CFG ScalenumberNo0.5How strongly generation follows the prompt (0–1). Higher = more adherence, lower = more creative freedom. Default 0.5.
Aspect RatiooptionsNo1:1The aspect ratio of the generated output.
Options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3
DurationoptionsNo5Duration of the generated video in seconds.
Options: 5 (5 seconds), 10 (10 seconds)
ModeoptionsNostdGeneration mode — Standard is faster, Professional is higher quality.
Options: std (Standard), pro (Professional)
Wait for CompletionbooleanNofalseWhether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.)
Polling Interval (ms)numberNo5000Interval in milliseconds between polling attempts. (shown when Wait for Completion is true)
Max Wait (seconds)numberNo300Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true)
Download ResultbooleanNofalseWhether to download the result media as binary data when the task completes. (shown when Wait for Completion is true)
Output Binary FieldstringNodataName of the binary property to store the downloaded result. (shown when Download Result is true)

Video: Image to Video

ParameterTypeRequiredDefaultDescription
PromptstringNoText prompt. Required by Kling for text-to-image/video and multi-image-to-video; optional for image-to-video and video extension. Supports expressions.
Negative PromptstringNoThings to exclude from the generated result. Supports expressions.
Model (video)optionsNokling-v2-1Kling video model. For anything else, use the Custom Model field below.
Options: kling-v1-6 (Kling v1.6, latest v1), kling-v2-1 (Kling v2.1, latest v2), kling-video-o1 (Kling Video O1), kling-v3-omni (Kling v3 Omni)
Custom Model (overrides dropdown)stringNoOptional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above.
CFG ScalenumberNo0.5How strongly generation follows the prompt (0–1). Higher = more adherence, lower = more creative freedom. Default 0.5.
Image SourceoptionsNourlHow to provide images for this operation (start frame for image-to-video; source image for an effect). The secondary images (end frame / effect 2nd image) use this same setting.
Options: url, base64, binary
Image URL (start frame)stringNoURL of the input image — the start/first frame for image-to-video. (shown when Image Source is url)
Image Base64 (start frame)stringNoBase64-encoded input image (start frame). (shown when Image Source is base64)
Input Binary Field (start frame)stringNodataBinary property holding the input image (start frame). (shown when Image Source is binary)
End Frame Image URL (optional)stringNoOptional end/tail frame URL. When set, Kling interpolates from the start frame to this end frame (image_tail). (shown when Image Source is url)
End Frame Image Base64 (optional)stringNoOptional end/tail frame, base64-encoded (image_tail). (shown when Image Source is base64)
End Frame Binary Field (optional)stringNoOptional binary property holding the end/tail frame (image_tail). Leave blank for none. (shown when Image Source is binary)
DurationoptionsNo5Duration of the generated video in seconds.
Options: 5 (5 seconds), 10 (10 seconds)
ModeoptionsNostdGeneration mode — Standard is faster, Professional is higher quality.
Options: std (Standard), pro (Professional)
Wait for CompletionbooleanNofalseWhether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.)
Polling Interval (ms)numberNo5000Interval in milliseconds between polling attempts. (shown when Wait for Completion is true)
Max Wait (seconds)numberNo300Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true)
Download ResultbooleanNofalseWhether to download the result media as binary data when the task completes. (shown when Wait for Completion is true)
Output Binary FieldstringNodataName of the binary property to store the downloaded result. (shown when Download Result is true)

Video: Lip Sync

ParameterTypeRequiredDefaultDescription
Lip Sync Video SourceoptionsNovideoIdLip sync runs on a VIDEO: a previously generated Kling video (by ID) or an uploaded video URL.
Options: videoId (a Kling video ID), videoUrl (an uploaded video URL)
Lip Sync Video IDstringNoID of a previously generated Kling video to lip-sync (5s/10s, kept ≤30 days). (shown when Lip Sync Video Source is videoId)
Lip Sync Video URLstringNoURL of a video to lip-sync (.mp4/.mov, 2–10s, 720p/1080p, ≤100MB). (shown when Lip Sync Video Source is videoUrl)
Lip Sync ModeoptionsNotext2videoDrive lip movement from generated speech (TTS) or from an audio file.
Options: text2video (Text to Speech), audio2video (Audio File)
Lip Sync TextstringNoText to speak (TTS mode). Kling limit ~120 characters. (shown when Lip Sync Mode is text2video)
Voice IDstringNoKling TTS voice_id (e.g. “reader_en_m-v1” for English, “genshin_vindi2” for Chinese). (shown when Lip Sync Mode is text2video)
Voice LanguageoptionsNoenTTS voice language. (shown when Lip Sync Mode is text2video)
Options: en (English), zh (Chinese)
Voice SpeednumberNo1TTS speaking speed (0.8–2.0). (shown when Lip Sync Mode is text2video)
Audio URLstringNoURL of an audio file to drive lip movement (.mp3/.wav/.m4a/.aac, ≤5MB). (shown when Lip Sync Mode is audio2video)
Wait for CompletionbooleanNofalseWhether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.)
Polling Interval (ms)numberNo5000Interval in milliseconds between polling attempts. (shown when Wait for Completion is true)
Max Wait (seconds)numberNo300Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true)
Download ResultbooleanNofalseWhether to download the result media as binary data when the task completes. (shown when Wait for Completion is true)
Output Binary FieldstringNodataName of the binary property to store the downloaded result. (shown when Download Result is true)

Video: Multi-Image to Video

ParameterTypeRequiredDefaultDescription
PromptstringNoText prompt. Required by Kling for text-to-image/video and multi-image-to-video; optional for image-to-video and video extension. Supports expressions.
Negative PromptstringNoThings to exclude from the generated result. Supports expressions.
Model (video)optionsNokling-v2-1Kling video model. For anything else, use the Custom Model field below.
Options: kling-v1-6 (Kling v1.6, latest v1), kling-v2-1 (Kling v2.1, latest v2), kling-video-o1 (Kling Video O1), kling-v3-omni (Kling v3 Omni)
Custom Model (overrides dropdown)stringNoOptional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above.
CFG ScalenumberNo0.5How strongly generation follows the prompt (0–1). Higher = more adherence, lower = more creative freedom. Default 0.5.
Image ListstringYesReference images for multi-image-to-video — a JSON array of image URLs/base64 (e.g. [“https://…”,“https://…”]) or a comma-separated list. Up to ~4 images.
DurationoptionsNo5Duration of the generated video in seconds.
Options: 5 (5 seconds), 10 (10 seconds)
ModeoptionsNostdGeneration mode — Standard is faster, Professional is higher quality.
Options: std (Standard), pro (Professional)
Aspect RatiooptionsNo1:1The aspect ratio of the generated output.
Options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3
Wait for CompletionbooleanNofalseWhether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.)
Polling Interval (ms)numberNo5000Interval in milliseconds between polling attempts. (shown when Wait for Completion is true)
Max Wait (seconds)numberNo300Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true)
Download ResultbooleanNofalseWhether to download the result media as binary data when the task completes. (shown when Wait for Completion is true)
Output Binary FieldstringNodataName of the binary property to store the downloaded result. (shown when Download Result is true)

Video: Extend Video

ParameterTypeRequiredDefaultDescription
PromptstringNoText prompt. Required by Kling for text-to-image/video and multi-image-to-video; optional for image-to-video and video extension. Supports expressions.
Negative PromptstringNoThings to exclude from the generated result. Supports expressions.
CFG ScalenumberNo0.5How strongly generation follows the prompt (0–1). Higher = more adherence, lower = more creative freedom. Default 0.5.
Source Video IDstringYesThe ID of a previously generated (succeeded) Kling video to extend/continue.
Wait for CompletionbooleanNofalseWhether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.)
Polling Interval (ms)numberNo5000Interval in milliseconds between polling attempts. (shown when Wait for Completion is true)
Max Wait (seconds)numberNo300Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true)
Download ResultbooleanNofalseWhether to download the result media as binary data when the task completes. (shown when Wait for Completion is true)
Output Binary FieldstringNodataName of the binary property to store the downloaded result. (shown when Download Result is true)

Video: Video Effects

ParameterTypeRequiredDefaultDescription
Model (video)optionsNokling-v2-1Kling video model. For anything else, use the Custom Model field below.
Options: kling-v1-6 (Kling v1.6, latest v1), kling-v2-1 (Kling v2.1, latest v2), kling-video-o1 (Kling Video O1), kling-v3-omni (Kling v3 Omni)
Custom Model (overrides dropdown)stringNoOptional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above.
Image SourceoptionsNourlHow to provide images for this operation (start frame for image-to-video; source image for an effect). The secondary images (end frame / effect 2nd image) use this same setting.
Options: url, base64, binary
Image URL (start frame)stringNoURL of the input image — the start/first frame for image-to-video. (shown when Image Source is url)
Image Base64 (start frame)stringNoBase64-encoded input image (start frame). (shown when Image Source is base64)
Input Binary Field (start frame)stringNodataBinary property holding the input image (start frame). (shown when Image Source is binary)
EffectoptionsNosquishThe Kling effect. Single-image effects use the Image above; dual-character effects (hug/kiss/heart_gesture) also need the Second Image.
Options: squish (single image), expansion (single image), fuzzyfuzzy (single image), hug (two portraits), kiss (two portraits), heart_gesture (two portraits)
Second Image URL (dual-character effects)stringNoSecond portrait image URL for dual-character effects. The first image comes from the Image above. (shown when Image Source is url)
Second Image Base64 (dual-character effects)stringNoSecond portrait image (base64) for dual-character effects. (shown when Image Source is base64)
Second Image Binary Field (dual-character effects)stringNoBinary property holding the second portrait image for dual-character effects. (shown when Image Source is binary)
DurationoptionsNo5Duration of the generated video in seconds.
Options: 5 (5 seconds), 10 (10 seconds)
ModeoptionsNostdGeneration mode — Standard is faster, Professional is higher quality.
Options: std (Standard), pro (Professional)
Wait for CompletionbooleanNofalseWhether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.)
Polling Interval (ms)numberNo5000Interval in milliseconds between polling attempts. (shown when Wait for Completion is true)
Max Wait (seconds)numberNo300Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true)
Download ResultbooleanNofalseWhether to download the result media as binary data when the task completes. (shown when Wait for Completion is true)
Output Binary FieldstringNodataName of the binary property to store the downloaded result. (shown when Download Result is true)

Video: Get

ParameterTypeRequiredDefaultDescription
Task IDstringYesThe ID of the task to retrieve. Supports expressions.
Video TypeoptionsNotext2videoThe type of video task to query.
Options: text2video (Text to Video), image2video (Image to Video), lip-sync (Lip Sync)

Video: List

ParameterTypeRequiredDefaultDescription
Video TypeoptionsNotext2videoThe type of video task to query.
Options: text2video (Text to Video), image2video (Image to Video), lip-sync (Lip Sync)

Virtual Try-On: Create

ParameterTypeRequiredDefaultDescription
Model Image SourceoptionsNourlHow to provide the model image for try-on.
Options: url, binary
Model Image URLstringNoURL of the model image. (shown when Model Image Source is url)
Model Image Binary FieldstringNomodelImageName of the binary property containing the model image. (shown when Model Image Source is binary)
Cloth Image SourceoptionsNourlHow to provide the clothing image for try-on.
Options: url, binary
Cloth Image URLstringNoURL of the clothing image. (shown when Cloth Image Source is url)
Cloth Image Binary FieldstringNoclothImageName of the binary property containing the clothing image. (shown when Cloth Image Source is binary)
Wait for CompletionbooleanNofalseWhether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.)
Polling Interval (ms)numberNo5000Interval in milliseconds between polling attempts. (shown when Wait for Completion is true)
Max Wait (seconds)numberNo300Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true)
Download ResultbooleanNofalseWhether to download the result media as binary data when the task completes. (shown when Wait for Completion is true)
Output Binary FieldstringNodataName of the binary property to store the downloaded result. (shown when Download Result is true)

A virtual try-on request is built from the two images alone — there is no prompt or aspect ratio to set.

Virtual Try-On: Get

ParameterTypeRequiredDefaultDescription
Task IDstringYesThe ID of the task to retrieve. Supports expressions.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo3Maximum number of items to process concurrently.

Output Data

One output item per input item. The Kling task payload is merged into the item JSON at the top level, so its fields sit alongside the fields the item already carried, and binary data on the input item is forwarded.

{
  "task_id": "abc123",
  "task_status": "succeed",
  "task_result": {
    "videos": [
      { "url": "https://…/generated-video.mp4" }
    ]
  }
}
  • task_id identifies the submitted job. With Wait for Completion off, generation operations return as soon as the task is accepted, so this is the only useful field — hand it to the matching Get operation later.
  • task_status reports where the job stands. With Wait for Completion on, the node polls until the status is succeed and then returns; a task that reports failure, or that is still unfinished after Max Wait, is raised as an item error instead.
  • task_result appears on a finished task. It carries images for image generation and try-on and videos for the video operations; each entry has a url.
  • Get and List return the same task payload for the task or tasks you asked about, without polling.

With Download Result on, the first result URL is fetched and stored as binary data on the property named by Output Binary Field, as result.mp4, result.png or result.jpg depending on the media type. Binary data already on the item is kept alongside it.

Reference the result downstream by expression, e.g. {{ $json.task_id }} or {{ $json.task_result.videos[0].url }}.

Usage Examples

  • Generate an AI image from a text prompt
  • Restyle an image with Kling image-to-image
  • Create a video from a text description
  • Convert an image to a video with Kling AI
  • Build a video from several reference images
  • Extend an existing Kling video
  • Apply a Kling video effect to a photo
  • Lip sync speech onto an existing video
  • Virtual try-on: overlay clothing on a model image
  • Get the status of a Kling AI generation task
  • List all image generation tasks

Example Configuration

Generate an image from text and wait for the result, downloading it as binary data:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "image",
    "operation": "create",
    "prompt": "A photorealistic mountain landscape at golden hour, 4K",
    "negativePrompt": "blurry, low quality, oversaturated",
    "imageModel": "kling-v2-1",
    "n": 1,
    "aspectRatio": "16:9",
    "waitForCompletion": true,
    "pollingInterval": 3000,
    "maxWaitSeconds": 120,
    "downloadResult": true,
    "outputBinaryPropertyName": "generatedImage"
  }
}

Generate images and return immediately with the task ID:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "image",
    "operation": "create",
    "prompt": "A minimalist abstract painting with cool blue tones",
    "imageModel": "kling-v1-5",
    "n": 3,
    "aspectRatio": "1:1",
    "waitForCompletion": false
  }
}

Image-to-image — restyle a reference image coming from an upstream node:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "image",
    "operation": "create",
    "prompt": "Same product on a marble surface, soft studio lighting",
    "imageModel": "kling-image-o1",
    "imageGenSource": "binary",
    "imageGenBinary": "data",
    "waitForCompletion": true,
    "downloadResult": true,
    "outputBinaryPropertyName": "restyled"
  }
}

Get an image task by ID:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "image",
    "operation": "get",
    "taskId": "{{ $json.task_id }}"
  }
}

List all image tasks:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "image",
    "operation": "list"
  }
}

Text-to-video generation:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "text2video",
    "prompt": "A cinematic drone shot flying over a dense rainforest at dawn",
    "negativePrompt": "shaky camera, pixelated, watermark",
    "model": "kling-v2-1",
    "aspectRatio": "16:9",
    "duration": "10",
    "mode": "pro",
    "waitForCompletion": true,
    "pollingInterval": 5000,
    "maxWaitSeconds": 300,
    "downloadResult": false
  }
}

Image-to-video from a URL:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "image2video",
    "model": "kling-v2-1",
    "imageSource": "url",
    "imageUrl": "https://example.com/input-photo.jpg",
    "duration": "5",
    "mode": "std",
    "waitForCompletion": true,
    "pollingInterval": 4000,
    "maxWaitSeconds": 180,
    "downloadResult": true,
    "outputBinaryPropertyName": "outputVideo"
  }
}

Image-to-video from binary data, interpolating to an end frame:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "image2video",
    "model": "kling-v1-6",
    "imageSource": "binary",
    "imageBinaryPropertyName": "uploadedImage",
    "imageTailBinary": "finalFrame",
    "duration": "10",
    "mode": "pro",
    "waitForCompletion": false
  }
}

Multi-image-to-video from several reference images:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "multiImage2video",
    "prompt": "The product rotates slowly on a pedestal",
    "model": "kling-v2-1",
    "imageList": "[\"https://example.com/front.jpg\",\"https://example.com/side.jpg\"]",
    "duration": "5",
    "mode": "std",
    "waitForCompletion": true,
    "downloadResult": true,
    "outputBinaryPropertyName": "productVideo"
  }
}

Extend an existing Kling video:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "videoExtend",
    "videoId": "{{ $json.videoId }}",
    "prompt": "The camera keeps pushing forward through the doorway",
    "cfgScale": 0.5,
    "waitForCompletion": true,
    "maxWaitSeconds": 600
  }
}

Apply a single-image effect:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "effects",
    "effectScene": "squish",
    "model": "kling-v1-6",
    "imageSource": "url",
    "imageUrl": "https://example.com/toy.jpg",
    "duration": "5",
    "mode": "std",
    "waitForCompletion": true,
    "downloadResult": true,
    "outputBinaryPropertyName": "effectVideo"
  }
}

Apply a dual-character effect, which needs a second portrait from the same source type:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "effects",
    "effectScene": "hug",
    "model": "kling-v1-6",
    "imageSource": "url",
    "imageUrl": "https://example.com/person-a.jpg",
    "effectSecondImageUrl": "https://example.com/person-b.jpg",
    "duration": "5",
    "mode": "std"
  }
}

Lip sync a previously generated Kling video with text-to-speech:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "lipSync",
    "lipSyncVideoSource": "videoId",
    "lipSyncVideoId": "{{ $json.videoId }}",
    "lipSyncMode": "text2video",
    "lipSyncText": "Thank you for watching our product demonstration.",
    "lipSyncVoiceId": "reader_en_m-v1",
    "lipSyncVoiceLanguage": "en",
    "lipSyncVoiceSpeed": 1,
    "waitForCompletion": true,
    "pollingInterval": 4000,
    "maxWaitSeconds": 360,
    "downloadResult": true,
    "outputBinaryPropertyName": "lipSyncVideo"
  }
}

Lip sync an uploaded video from an audio file:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "lipSync",
    "lipSyncVideoSource": "videoUrl",
    "lipSyncVideoUrl": "https://example.com/speaker.mp4",
    "lipSyncMode": "audio2video",
    "lipSyncAudioUrl": "https://example.com/voiceover.mp3",
    "waitForCompletion": false
  }
}

Get a video task by ID:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "get",
    "taskId": "{{ $json.task_id }}",
    "videoType": "text2video"
  }
}

List lip sync video tasks:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "video",
    "operation": "list",
    "videoType": "lip-sync"
  }
}

Virtual try-on with both images supplied as URLs:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "tryOn",
    "operation": "create",
    "tryOnModelImageSource": "url",
    "tryOnModelImageUrl": "https://example.com/model-person.jpg",
    "tryOnClothImageSource": "url",
    "tryOnClothImageUrl": "https://example.com/shirt.jpg",
    "waitForCompletion": true,
    "pollingInterval": 4000,
    "maxWaitSeconds": 180,
    "downloadResult": true,
    "outputBinaryPropertyName": "tryOnResult"
  }
}

Virtual try-on with the model image from a URL and the garment from binary data:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "tryOn",
    "operation": "create",
    "tryOnModelImageSource": "url",
    "tryOnModelImageUrl": "https://example.com/model.jpg",
    "tryOnClothImageSource": "binary",
    "tryOnClothBinaryProperty": "clothingImageData",
    "waitForCompletion": false
  }
}

Get a try-on task by ID:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "tryOn",
    "operation": "get",
    "taskId": "{{ $json.task_id }}"
  }
}

Get account resource packages — the last 30 days by default, narrowed by startTime and endTime (Unix milliseconds) when the incoming item carries them:

{
  "type": "kling_ai",
  "parameters": {
    "resource": "account",
    "operation": "getResourcePackages"
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Kling AI generates images from text prompts or a reference image, converts text, one image or several into video, extends or applies effects to existing videos, overlays clothing onto model photos via virtual try-on, and lip-syncs speech onto an existing video using the Kling AI REST API. Use it when a workflow requires AI-generated visual media, product garment visualization, or lip-synced video production. Every generation is asynchronous: the node returns a task_id immediately unless Wait for Completion is on, and can download the finished media as binary data on the main output.

Key Rules Summary

  • Every generation is asynchronous. Leave Wait for Completion off to submit and move on, then read the result later with the matching Get operation; turn it on to hold the item until the media is ready. Waiting stops after Max Wait (seconds), which defaults to 300 — raise it for long clips.
  • Downloading requires waiting. Download Result only appears once Wait for Completion is on, and Output Binary Field only once Download Result is on.
  • One source setting drives every image field in an operation. Image Source picks URL, base64 or binary for the start frame, the end frame and the second effect portrait together — provide those images in the same form.
  • Custom Model wins. Anything you type into Custom Model (overrides dropdown) replaces the model chosen in the dropdown, which is how you reach a Kling model that is not listed.
  • Duration values are strings. Use 5 or 10, and note that only Standard and Professional modes exist.
  • Dual-character effects need two portraits. hug, kiss and heart_gesture fail without the Second Image; the other effects use the single image.
  • Lip sync runs on a video, not a still image — either a Kling video ID from an earlier generation, or the URL of a video you host.

Frequently asked questions

Does the node wait for the video to finish?

Only if you ask it to. Every generation is asynchronous: the node returns a `task_id` immediately unless Wait for Completion is on, in which case it waits and can download the finished media as binary.

What do I do with a task_id?

Poll for the result later in the workflow — useful when generation is slow and you would rather not hold the run open waiting for it.

What can it produce besides plain video?

Images from text or a reference image, video from text or one or several images, extensions and effects on existing video, virtual try-on, and lip-sync — all through the same node.

How does the finished media arrive?

As binary data on the main output when Wait for Completion is enabled, ready to upload, attach or store without a separate download step.

Build with the Kling AI node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Kling AI API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.