Nodes/ComfyUI API Toolkit/Kling AI Cloud Uploader
ComfyUI Node

Kling AI Cloud Uploader

The node that gets your files onto a URL, because Kling won't take them any other way

By IxMxAMAR·Created 5 months ago·Updated 2 months ago· 1
Kling AI Cloud Uploader
  • audio
  • image
  • url
providerauto
file_path
preserve_audio_qualitytrue
audio_formatwav

Kling's API has a quirk you'll hit the moment you try to feed it an existing audio or video: a lot of its endpoints want a URL, not raw bytes. This node is the plumbing that gets you there. Give it an image, an audio clip, or a path to a local file, and it uploads the thing to a public file host and hands you back a STRING URL you can paste into any node that asks for one.

It doesn't call Kling at all - it's an uploader with a fallback chain. The one required input is provider, and the default auto is genuinely the right answer: it tries catbox (permanent) first, then litterbox (temp, 1/24/72h), 0x0 (permanent), uguu (24h), and finally tmpfiles (the tooltip's word for it: unreliable). If catbox is up, that's where your file lands. This is the pack's "cloud uploader auto-fallback" feature from the README, and it means you don't have to babysit a down host.

The other inputs only matter depending on what you're uploading:

  • image (IMAGE) or audio (AUDIO) - wire one of these in, or use file_path for a raw local file. Upload exactly one.
  • preserve_audio_quality - default True keeps your audio at its original sample rate and channels. Set it to False and it downsamples to 16kHz mono, which is only useful if the audio is going back into Kling's TTS as input. For anything you want to actually keep, leave it on.
  • audio_format - wav (lossless, huge), flac (lossless, smaller), or mp3 (small, lossy). wav is the default and the safe choice for feeding Kling.

Output is a single url string. That's the whole node.

Installing it

Part of the ComfyUI-API-Toolkit pack. ComfyUI Manager: search "API Toolkit". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
pip install -r requirements.txt

Restart ComfyUI. The audio path uses soundfile under the hood (falls back to torchaudio), so if you're only uploading images, requests alone will do.

Gotchas

Two things catch people. First, the free hosts aren't SLA-grade - catbox is permanent but occasionally slow, and tmpfiles really is unreliable, which is why it's last in the chain. Don't build a production pipeline on these; they're for getting a clip into Kling, not hosting your portfolio. Second, the URL you get back is public by definition. Anything you upload here is on the internet, which matters for the same reason everything in this pack matters: your source images and audio are already leaving the machine for the Kling API, and this node makes that trip explicit. Keep the Kling API Toolkit to files you're comfortable being public, and you'll have a good time. It's the exact trade the whole API-node category runs on.

CategoryAPI Toolkit/Kling AI/Config

Inputs (6)

NameTypeDefaultDescription
providerCOMBOautoCloud host. 'auto' tries catbox -> litterbox -> 0x0 -> uguu -> tmpfiles (recommended). catbox = permanent. litterbox = 1/24/72h temp. 0x0 = permanent. uguu = 24h. tmpfiles = unreliable.
audiooptAUDIO
imageoptIMAGE
file_pathoptSTRINGPath to a local file to upload.
preserve_audio_qualityoptBOOLEANtrueIf True, uploads audio at original sample rate and channels (no downsampling). If False, downsamples to 16kHz mono (old behavior — only useful if the audio will be fed back into Kling TTS input).
audio_formatoptCOMBOwavAudio encoding format. wav = lossless uncompressed (large). flac = lossless compressed. mp3 = lossy but small.

Outputs (1)

NameTypeDescription
urlSTRING