ComfyUI Node

Kimi K3

An LLM in the graph, and yes it takes images

By felipederosilva·Created 2 months ago·Updated 2 days ago· 3
Kimi K3
  • images
  • text
  • raw_json
  • credits_consumed
  • usage_json
  • credits_left
◄prompt►
◄system_prompt►
◄streamfalse►
◄tools_json[]►
◄history_json[]►
◄reasoning_efforthigh►
◄max_output_tokens4096►
◄expert_override_json{}►

Every serious ComfyUI graph eventually wants a text model in it: to expand a prompt, caption an image, turn a shot list into a paragraph, or decide which branch to take. The local answer is an LLM on your own GPU via Ollama or a GGUF loader; the hosted answer is a node like this one, which puts Kimi K3 - Moonshot's frontier model, the one people name alongside MiniMax H3 when they talk about Chinese labs shipping genuinely competitive open-weights systems - inside the canvas.

The trade is the same as every API node: no VRAM, no download, and your text (and images, if you send any) go to a server. What you get back is a plain STRING you can wire into any prompt field in the graph.

Inputs

prompt (required) is the user message. It's the only input you must set - everything else has a sane default.

system_prompt is your instructions to the model. On this endpoint it's sent as the request's instructions field, so it behaves like a proper system message: tone, format, constraints, "reply with the prompt only, no preamble." For prompt-expansion duty, that last one saves you a cleanup node.

images is an IMAGE socket. The pack uploads each image and attaches it to the request as an input image, which makes this a vision node as well as a text node - caption a batch, or ask "describe the lighting in this render." Feed it a batch and each frame goes up as a separate image.

reasoning_effort is low, medium, high (default), xhigh. Higher effort means more thinking before the answer - better on fiddly instructions, slower, and metered in tokens.

max_output_tokens defaults to 4096 and goes up to 131072. Long generations are the expensive ones; cap it when you're calling this node hundreds of times in a batch.

history_json is a JSON array of prior messages, for multi-turn context - the pack passes it through as the request's input items, so a conversation stitched together by upstream nodes keeps working.

tools_json is for function/tool definitions the endpoint supports, and stream toggles streaming. Leave both alone unless you know why you want them. expert_override_json is the pack's escape hatch for raw request fields - it exists for newly documented parameters, not for normal use.

Outputs

text is the STRING you wire onward - into a KIE prompt field, a text preview node, a save-text node. usage_json carries the token accounting, which is how this node's cost is actually measured (unlike the image and video nodes, where you pay per generation). raw_json is the full response, credits_consumed and credits_left are floats, and credits_left reports -1 when the balance service is unavailable.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
cd ComfyUI-KIE-Nodes-Next
pip install -r requirements.txt

Restart ComfyUI; it's under KIE Next / LLM / Kimi. Four light dependencies, no model weights, no VRAM. Windows one-click installer in dist/. Manager availability is uncertain - the README still frames the registry route as pending, so clone it.

Key once: Settings → KIE.ai Nodes Next → Connection. Validated before saving, masked after, never written into the workflow. Servers can use KIE_API_KEY, which takes priority over the saved key.

Practical notes

Check the split before you build on it. An LLM node in a graph is a coin flip on determinism, and any hosted model can change under you. If your workflow depends on the output format, put your instructions in system_prompt and ask for structured output explicitly.

history_json is where token cost hides. Every turn you carry forward is billed again on the next call. For a captioning loop, keep it empty.

Images count as input tokens. Sending a 4-image batch to ask one question costs more than you think; ask once per image if it's cheaper for you.

The pack is honest about where the LLM path sits. Its README points normal users at individual model nodes rather than generic wrappers, and this is exactly that - one node per model, no model dropdown to misconfigure. If you want Claude or GPT instead, the same pack has those nodes in the same folder structure.

CategoryKIE Next/LLM/Kimi

Inputs (9)

NameTypeDefaultDescription
promptSTRINGUser prompt / message.
system_promptoptSTRING—
streamoptBOOLEANfalse—
tools_jsonoptSTRING[]Optional function/tool definitions supported by this model endpoint.
history_jsonoptSTRING[]Optional prior message/input array as JSON.
imagesoptIMAGE—
reasoning_effortoptCOMBOhigh4 options: low, medium, high, xhigh
max_output_tokensoptINT40961–131072—
expert_override_jsonoptSTRING{}Expert-only request overrides. Normal use does not require this.

Outputs (5)

NameTypeDescription
textSTRING—
raw_jsonSTRING—
credits_consumedFLOAT—
usage_jsonSTRING—
credits_leftFLOAT—