Kling Image Generation
Kling text-to-image straight into your ComfyUI graph
- auth
- image
- url
- task_id
The flagship image node of the Kling half of this pack. You type a prompt, Kling's kling-v3 model draws it, and the result drops back into your graph as a normal IMAGE tensor - ready for a preview node, a save node, a VAE, or the next stage of your workflow. If you've never used a cloud-image node before, this is the one to start with: one prompt, one click, image comes back. It's the cleanest possible demo of why API-wrapper nodes exist at all.
Mechanically it's a submit-and-poll cloud task: the node sends your prompt and settings to Kling's API (via the Singapore endpoint), gets a task_id, then polls until the image is done. Unlike a local sampler, this runs on Kling's GPUs - your only cost is credits and a few seconds of waiting. The pack handles the JWT signing, retries with backoff, and gives you a readable hint instead of a bare error code when something breaks.
Inputs worth your attention:
promptandnegative_prompt- the text. Kling is a Chinese-model-born-now-global generator; plain English descriptive prompts work fine.model_name- currently locked tokling-v3. Nothing to pick yet.aspect_ratio- 16:9, 9:16, 1:1, 3:2, 2:3, 4:3, 3:4.resolution-1k(~1024px) or2k(~2048px). 2k costs more credits and takes longer; don't default to it.fidelity- the fun one. 0.0 = creative, 1.0 = faithful to the prompt. 0.5 is the default middle ground. If generations keep ignoring your prompt, nudge this up; if they're stiff and over-literal, drop it.n- how many images (1–9). More is not free.
Outputs are image (tensor), url (hosted copy), and task_id.
Installing it
Bundled in ComfyUI-API-Toolkit. Manager: search "API Toolkit". Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
pip install -r requirements.txt
Restart ComfyUI. You'll also need the Kling AI Authentication node wired in with access/secret keys from app.klingai.com - that's where Kling's "no open weights" (KB: closed-source-models) really shows: no model to download, just keys.
Gotchas
The big one is the same across every node in this pack: this is not free and not local. Every queue spends credits, and your prompt leaves your machine. The community line is clear about when that's acceptable - API nodes are the right tool for models you can't run locally, and kling-v3 is exactly that. Also watch the error codes: 1102 is "balance not enough," 1003 is "API access not activated yet" (new accounts need KYC/approval), and 1302 is a content-policy rejection. The pack prints all of these with hints. And because the node implements IS_CHANGED, re-queueing re-runs - you won't get served yesterday's image.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| auth | KLING_AUTH | — | |
| prompt | STRING | Text description of the image to generate. | |
| negative_prompt | STRING | Things to avoid in the generated image. | |
| model_name | COMBO | kling-v3 | Kling image model version. |
| aspect_ratio | COMBO | 1:1 | Output image aspect ratio. |
| resolution | COMBO | 1k | Output resolution: 1k (~1024px) or 2k (~2048px). |
| fidelity | FLOAT | 0.500–1 | Image fidelity/detail level (0.0 = creative, 1.0 = faithful). |
| n | INT | 11–9 | Number of images to generate (1-9). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| task_id | STRING | — |