Nodes/ComfyUI-Kling-Direct/Kling AI Asset Upload
ComfyUI Node

Kling AI Asset Upload

Getting Your Media Into Kling's Vault, On Purpose

By IxMxAMAR·Created 5 months ago·Updated 2 months ago· 4
Kling AI Asset Upload
  • auth
  • image
  • asset_id
  • asset_url
asset_typeimage
image_path
video_path

Kling AI Asset Upload is the pack's way of pushing media into Kling's materials library so you can reference it later by ID. Think of it as the "save to cloud drive" step: it takes an image or video from your ComfyUI graph and uploads it to Kling's asset store, returning an asset_id you can pass to nodes that work from asset IDs (like Image Extend) or asset_url for anything that wants a hosted URL. It's not something you need in every workflow - most generation nodes upload their inputs automatically - but it's essential when you want to reuse a single uploaded asset across multiple tasks without re-uploading each time.

How it works

The node needs three things in play: an auth input (the KLING_AUTH object), an asset_type (image or video), and the actual content. Content delivery is where it's picky, so read this part:

  • Image: give it either an IMAGE tensor directly, or an image_path pointing at a file on disk. Either works; tensor is the common ComfyUI path.
  • Video: there is no tensor shortcut - it requires a video_path. You'll want the pack's Raw File Loader node to hand you a path to a local video file, then feed that into video_path.

It uploads to Kling's materials API and returns two outputs: asset_id (a STRING, for nodes that want the ID) and asset_url (a STRING, for URL-based calls). In practice you'll mostly care about the asset_id - that's the handle Kling's own API uses for things like image_id on the Image Extend node, which has an image_id field just waiting for it.

The node is marked AlwaysExecuteMixin, so it re-runs even when nothing downstream changed. That matters for a node with side effects: it uploads on every execution. If you wire a static image into it and hit run repeatedly, you're making multiple uploads and (if Kling meters storage) potentially paying for duplicates. Fine for experiments, worth knowing before you leave it in a batch pipeline.

Where it actually matters

The clearest use is the Image Extend workflow: that node takes an image_id, and the natural way to get one is to upload once with Asset Upload and feed the asset_id straight in. It's also the building block if you're assembling a materials library for the avatar or virtual try-on flows, where Kling wants assets it can repeatedly reference. And asset_url is useful when a downstream node wants a URL instead of a raw ID.

Common issues

  • "Kling Video Upload requires a video_path (Raw File)." - you tried to upload a video without a path. There's no IMAGE input for videos; use the Raw File Loader (or any node that outputs a local path) and wire it into video_path.
  • "requires either an image input or image_path." - you set asset_type to image but supplied neither. Give it one or the other.
  • Upload succeeds but the ID won't validate downstream. Make sure asset_type matches what you're actually uploading; a video uploaded as an image will produce an asset that other endpoints refuse.

Install

It's part of ComfyUI-Kling-Direct, so installing the pack gets you this node:

cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-Kling-Direct

or ComfyUI Manager → search "Kling Direct" → install → restart. No model downloads, no GPU - the pack only relies on libraries ComfyUI already bundles. One tip: if your goal is just "turn this video into a URL for a URL-based Kling call," the pack's Cloud Uploader is a different tool for a different job (public paste-bin hosts); Asset Upload is the one that stays inside Kling's own system.

CategoryKling AI/Config

Inputs (5)

NameTypeDefaultDescription
authKLING_AUTH
asset_typeCOMBOimageType of asset to upload.
imageoptIMAGE
image_pathoptSTRINGPath to an image file on disk.
video_pathoptSTRINGPath to a video file on disk.

Outputs (2)

NameTypeDescription
asset_idSTRING
asset_urlSTRING