Reference · Tools
Kling AI
Generate images and videos, virtual try-on, and lip sync using Kling AI API.
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
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires Kling AI API credentials. See the Credentials Guide for setup instructions.
Resources
| Resource | Value |
|---|---|
| Image | image |
| Video | video |
| Virtual Try-On | tryOn |
| Account | account |
Operations
Which operations are offered depends on the resource you select.
| Operation | Value | Description |
|---|---|---|
| Create | create | Generate images from a text prompt |
| Get | get | Get image generation task by ID |
| List | list | List all image generation tasks |
| Text to Video | text2video | Generate video from text prompt |
| Image to Video | image2video | Generate video from an image |
| Lip Sync | lipSync | Lip sync text to a video or image |
| Multi-Image to Video | multiImage2video | Generate video from multiple reference images |
| Extend Video | videoExtend | Extend/continue an existing Kling video by ID |
| Video Effects | effects | Apply a single-image or dual-character video effect |
| Get | get | Get video task by ID |
| List | list | List video tasks |
| Create | create | Create virtual try-on |
| Get | get | Get try-on task by ID |
| List | list | List try-on tasks |
| Get Resource Packages | getResourcePackages | Get 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Prompt | string | No | — | Text 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 Prompt | string | No | — | Things to exclude from the generated result. Supports expressions. |
| Model (image) | options | No | kling-v2-1 | Kling 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) | string | No | — | Optional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above. |
| Number of Images | number | No | 1 | Number of images to generate (1-9). |
| Aspect Ratio | options | No | 1:1 | The 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) | options | No | none | Optional 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 URL | string | No | — | URL of the reference image for image-to-image. (shown when Reference Image Source (image-to-image) is url) |
| Reference Image Base64 | string | No | — | Base64-encoded reference image for image-to-image. (shown when Reference Image Source (image-to-image) is base64) |
| Reference Image Binary Field | string | No | data | Binary property holding the reference image for image-to-image. (shown when Reference Image Source (image-to-image) is binary) |
| Wait for Completion | boolean | No | false | Whether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.) |
| Polling Interval (ms) | number | No | 5000 | Interval in milliseconds between polling attempts. (shown when Wait for Completion is true) |
| Max Wait (seconds) | number | No | 300 | Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true) |
| Download Result | boolean | No | false | Whether to download the result media as binary data when the task completes. (shown when Wait for Completion is true) |
| Output Binary Field | string | No | data | Name of the binary property to store the downloaded result. (shown when Download Result is true) |
Image: Get
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Task ID | string | Yes | — | The ID of the task to retrieve. Supports expressions. |
Video: Text to Video
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Prompt | string | No | — | Text 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 Prompt | string | No | — | Things to exclude from the generated result. Supports expressions. |
| Model (video) | options | No | kling-v2-1 | Kling 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) | string | No | — | Optional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above. |
| CFG Scale | number | No | 0.5 | How strongly generation follows the prompt (0–1). Higher = more adherence, lower = more creative freedom. Default 0.5. |
| Aspect Ratio | options | No | 1:1 | The aspect ratio of the generated output. |
Options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 | ||||
| Duration | options | No | 5 | Duration of the generated video in seconds. |
Options: 5 (5 seconds), 10 (10 seconds) | ||||
| Mode | options | No | std | Generation mode — Standard is faster, Professional is higher quality. |
Options: std (Standard), pro (Professional) | ||||
| Wait for Completion | boolean | No | false | Whether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.) |
| Polling Interval (ms) | number | No | 5000 | Interval in milliseconds between polling attempts. (shown when Wait for Completion is true) |
| Max Wait (seconds) | number | No | 300 | Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true) |
| Download Result | boolean | No | false | Whether to download the result media as binary data when the task completes. (shown when Wait for Completion is true) |
| Output Binary Field | string | No | data | Name of the binary property to store the downloaded result. (shown when Download Result is true) |
Video: Image to Video
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Prompt | string | No | — | Text 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 Prompt | string | No | — | Things to exclude from the generated result. Supports expressions. |
| Model (video) | options | No | kling-v2-1 | Kling 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) | string | No | — | Optional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above. |
| CFG Scale | number | No | 0.5 | How strongly generation follows the prompt (0–1). Higher = more adherence, lower = more creative freedom. Default 0.5. |
| Image Source | options | No | url | How 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) | string | No | — | URL of the input image — the start/first frame for image-to-video. (shown when Image Source is url) |
| Image Base64 (start frame) | string | No | — | Base64-encoded input image (start frame). (shown when Image Source is base64) |
| Input Binary Field (start frame) | string | No | data | Binary property holding the input image (start frame). (shown when Image Source is binary) |
| End Frame Image URL (optional) | string | No | — | Optional 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) | string | No | — | Optional end/tail frame, base64-encoded (image_tail). (shown when Image Source is base64) |
| End Frame Binary Field (optional) | string | No | — | Optional binary property holding the end/tail frame (image_tail). Leave blank for none. (shown when Image Source is binary) |
| Duration | options | No | 5 | Duration of the generated video in seconds. |
Options: 5 (5 seconds), 10 (10 seconds) | ||||
| Mode | options | No | std | Generation mode — Standard is faster, Professional is higher quality. |
Options: std (Standard), pro (Professional) | ||||
| Wait for Completion | boolean | No | false | Whether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.) |
| Polling Interval (ms) | number | No | 5000 | Interval in milliseconds between polling attempts. (shown when Wait for Completion is true) |
| Max Wait (seconds) | number | No | 300 | Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true) |
| Download Result | boolean | No | false | Whether to download the result media as binary data when the task completes. (shown when Wait for Completion is true) |
| Output Binary Field | string | No | data | Name of the binary property to store the downloaded result. (shown when Download Result is true) |
Video: Lip Sync
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Lip Sync Video Source | options | No | videoId | Lip 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 ID | string | No | — | ID 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 URL | string | No | — | URL of a video to lip-sync (.mp4/.mov, 2–10s, 720p/1080p, ≤100MB). (shown when Lip Sync Video Source is videoUrl) |
| Lip Sync Mode | options | No | text2video | Drive lip movement from generated speech (TTS) or from an audio file. |
Options: text2video (Text to Speech), audio2video (Audio File) | ||||
| Lip Sync Text | string | No | — | Text to speak (TTS mode). Kling limit ~120 characters. (shown when Lip Sync Mode is text2video) |
| Voice ID | string | No | — | Kling TTS voice_id (e.g. “reader_en_m-v1” for English, “genshin_vindi2” for Chinese). (shown when Lip Sync Mode is text2video) |
| Voice Language | options | No | en | TTS voice language. (shown when Lip Sync Mode is text2video) |
Options: en (English), zh (Chinese) | ||||
| Voice Speed | number | No | 1 | TTS speaking speed (0.8–2.0). (shown when Lip Sync Mode is text2video) |
| Audio URL | string | No | — | URL of an audio file to drive lip movement (.mp3/.wav/.m4a/.aac, ≤5MB). (shown when Lip Sync Mode is audio2video) |
| Wait for Completion | boolean | No | false | Whether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.) |
| Polling Interval (ms) | number | No | 5000 | Interval in milliseconds between polling attempts. (shown when Wait for Completion is true) |
| Max Wait (seconds) | number | No | 300 | Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true) |
| Download Result | boolean | No | false | Whether to download the result media as binary data when the task completes. (shown when Wait for Completion is true) |
| Output Binary Field | string | No | data | Name of the binary property to store the downloaded result. (shown when Download Result is true) |
Video: Multi-Image to Video
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Prompt | string | No | — | Text 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 Prompt | string | No | — | Things to exclude from the generated result. Supports expressions. |
| Model (video) | options | No | kling-v2-1 | Kling 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) | string | No | — | Optional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above. |
| CFG Scale | number | No | 0.5 | How strongly generation follows the prompt (0–1). Higher = more adherence, lower = more creative freedom. Default 0.5. |
| Image List | string | Yes | — | Reference 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. |
| Duration | options | No | 5 | Duration of the generated video in seconds. |
Options: 5 (5 seconds), 10 (10 seconds) | ||||
| Mode | options | No | std | Generation mode — Standard is faster, Professional is higher quality. |
Options: std (Standard), pro (Professional) | ||||
| Aspect Ratio | options | No | 1:1 | The aspect ratio of the generated output. |
Options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 | ||||
| Wait for Completion | boolean | No | false | Whether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.) |
| Polling Interval (ms) | number | No | 5000 | Interval in milliseconds between polling attempts. (shown when Wait for Completion is true) |
| Max Wait (seconds) | number | No | 300 | Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true) |
| Download Result | boolean | No | false | Whether to download the result media as binary data when the task completes. (shown when Wait for Completion is true) |
| Output Binary Field | string | No | data | Name of the binary property to store the downloaded result. (shown when Download Result is true) |
Video: Extend Video
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Prompt | string | No | — | Text 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 Prompt | string | No | — | Things to exclude from the generated result. Supports expressions. |
| CFG Scale | number | No | 0.5 | How strongly generation follows the prompt (0–1). Higher = more adherence, lower = more creative freedom. Default 0.5. |
| Source Video ID | string | Yes | — | The ID of a previously generated (succeeded) Kling video to extend/continue. |
| Wait for Completion | boolean | No | false | Whether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.) |
| Polling Interval (ms) | number | No | 5000 | Interval in milliseconds between polling attempts. (shown when Wait for Completion is true) |
| Max Wait (seconds) | number | No | 300 | Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true) |
| Download Result | boolean | No | false | Whether to download the result media as binary data when the task completes. (shown when Wait for Completion is true) |
| Output Binary Field | string | No | data | Name of the binary property to store the downloaded result. (shown when Download Result is true) |
Video: Video Effects
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Model (video) | options | No | kling-v2-1 | Kling 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) | string | No | — | Optional. Exact model_name to send to Kling. When non-empty this OVERRIDES the Model dropdown above. |
| Image Source | options | No | url | How 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) | string | No | — | URL of the input image — the start/first frame for image-to-video. (shown when Image Source is url) |
| Image Base64 (start frame) | string | No | — | Base64-encoded input image (start frame). (shown when Image Source is base64) |
| Input Binary Field (start frame) | string | No | data | Binary property holding the input image (start frame). (shown when Image Source is binary) |
| Effect | options | No | squish | The 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) | string | No | — | Second 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) | string | No | — | Second portrait image (base64) for dual-character effects. (shown when Image Source is base64) |
| Second Image Binary Field (dual-character effects) | string | No | — | Binary property holding the second portrait image for dual-character effects. (shown when Image Source is binary) |
| Duration | options | No | 5 | Duration of the generated video in seconds. |
Options: 5 (5 seconds), 10 (10 seconds) | ||||
| Mode | options | No | std | Generation mode — Standard is faster, Professional is higher quality. |
Options: std (Standard), pro (Professional) | ||||
| Wait for Completion | boolean | No | false | Whether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.) |
| Polling Interval (ms) | number | No | 5000 | Interval in milliseconds between polling attempts. (shown when Wait for Completion is true) |
| Max Wait (seconds) | number | No | 300 | Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true) |
| Download Result | boolean | No | false | Whether to download the result media as binary data when the task completes. (shown when Wait for Completion is true) |
| Output Binary Field | string | No | data | Name of the binary property to store the downloaded result. (shown when Download Result is true) |
Video: Get
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Task ID | string | Yes | — | The ID of the task to retrieve. Supports expressions. |
| Video Type | options | No | text2video | The type of video task to query. |
Options: text2video (Text to Video), image2video (Image to Video), lip-sync (Lip Sync) |
Video: List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Video Type | options | No | text2video | The type of video task to query. |
Options: text2video (Text to Video), image2video (Image to Video), lip-sync (Lip Sync) |
Virtual Try-On: Create
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Model Image Source | options | No | url | How to provide the model image for try-on. |
Options: url, binary | ||||
| Model Image URL | string | No | — | URL of the model image. (shown when Model Image Source is url) |
| Model Image Binary Field | string | No | modelImage | Name of the binary property containing the model image. (shown when Model Image Source is binary) |
| Cloth Image Source | options | No | url | How to provide the clothing image for try-on. |
Options: url, binary | ||||
| Cloth Image URL | string | No | — | URL of the clothing image. (shown when Cloth Image Source is url) |
| Cloth Image Binary Field | string | No | clothImage | Name of the binary property containing the clothing image. (shown when Cloth Image Source is binary) |
| Wait for Completion | boolean | No | false | Whether to poll until the task completes before returning. (Generation operations only — get/list/account return immediately.) |
| Polling Interval (ms) | number | No | 5000 | Interval in milliseconds between polling attempts. (shown when Wait for Completion is true) |
| Max Wait (seconds) | number | No | 300 | Maximum time in seconds to wait for task completion. (shown when Wait for Completion is true) |
| Download Result | boolean | No | false | Whether to download the result media as binary data when the task completes. (shown when Wait for Completion is true) |
| Output Binary Field | string | No | data | Name 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Task ID | string | Yes | — | The ID of the task to retrieve. Supports expressions. |
All Operations
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Max Concurrency | number | No | 3 | Maximum 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_ididentifies 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_statusreports where the job stands. With Wait for Completion on, the node polls until the status issucceedand then returns; a task that reports failure, or that is still unfinished after Max Wait, is raised as an item error instead.task_resultappears on a finished task. It carriesimagesfor image generation and try-on andvideosfor the video operations; each entry has aurl.- 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
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes 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
5or10, and note that only Standard and Professional modes exist. - Dual-character effects need two portraits.
hug,kissandheart_gesturefail 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 BusyBotLast updated . Spotted something wrong? Tell us.