ComfyUI-JM-KlingAI-API
This is a custom node for ComfyUI that allows you to use the KLingAI API directly within the ComfyUI environment. It is developed based on the KLingAI API documentation. For more details, please refer to the official documentation.KLingAI API Documentation。
Requirements
Before using this node, you need to have a KLing AI API key.
Installation
Installing manually
- Navigate to the
ComfyUI/custom_nodesdirectory. - Clone this repository:
git clone https://github.com/synthetai/ComfyUI-JM-KLing-API.git - Install the dependencies:
- Windows (ComfyUI portable):
python -m pip install -r ComfyUI\custom_nodes\ComfyUI-JM-KLingAI-API\requirements.txt - Linux or MacOS:
cd ComfyUI-JM-KLingAI-API && pip install -r requirements.txt
- Start ComfyUI and enjoy using the KLing AI API node!
Nodes
KLingAI API Key
This node generates an API Token
Text2Video
This node is used to generate a video given a text prompt.
Image2Video
This node is used to generate a video given an image.
KLingAI Lip Sync
This node is used to create a lip sync task that makes a video's mouth movements match with provided audio.
KLingAI Lip Sync Async
This node processes longer audio files by automatically splitting them into segments and creates lip sync tasks asynchronously. It then monitors task progress, downloads the generated videos, and merges them into a single output video.
Features:
- Splits audio into 10-second segments (configurable)
- Supports both local audio files and audio URLs
- Maintains segment order during processing and final merging
- Asynchronously creates tasks for all segments
- Monitors task status with configurable poll interval
- Downloads and merges videos using FFmpeg
- Organizes files in a structured temporary directory
Note: This node requires the pydub package and FFmpeg to be installed on your system.

