Nodes/ComfyUI-Kie-API/KIE Gemini (LLM) [Experimental]
ComfyUI Node

KIE Gemini (LLM) [Experimental]

KIE Gemini (LLM) [Experimental]

By gateway·Created 9 months ago·Updated 4 months ago· 39
KIE Gemini (LLM) [Experimental]
  • images
  • video
  • audio
  • text
  • reasoning
  • data
modelgemini-3-pro
prompt
roleuser
streamtrue
include_thoughtstrue
reasoning_efforthigh
enable_google_searchfalse
messages_json
response_format_json
logtrue

ComfyUI workflows keep wanting a smart text step - prompt generation, prompt judging, structured output for a storyboard - and most people bolt an LLM on through some separate API node. This one does it natively in the KIE pack: KIE Gemini (LLM) calls Gemini chat completions through Kie.ai and returns the text straight into your graph. The "Experimental" tag is honest about the phase (the pack calls it phase-1/1.5, still adding features), but the core is solid: it works, and it's multimodal.

What makes it worth a look over a generic OpenAI node: it accepts images, video, and audio as media inputs alongside the prompt, exposes a reasoning output, and can hand back JSON. That's a genuinely capable "think about my images, then give me a prompt" node - the exact pattern the pack's own grid workflow uses for LLM-driven prompt generation.

How it works

A direct chat-completions call to KIE's Gemini endpoint (the pack's Gemini module uses streaming under the hood - SSE by default, with the full response assembled before it returns). If you connect media inputs, they're uploaded and included in the request as content parts. The messages_json input overrides the whole prompt/role/media stack if you want to drive a full conversation instead.

The inputs that matter

  • model - gemini-3-pro by default, with 2.5/3 Pro/Flash options.
  • prompt - required if messages_json is empty. Your instruction, plus whatever you've wired into the media inputs.
  • role - user default; developer/system/user/assistant/tool available.
  • images / video / audio - optional media. Connect an image and ask the model to describe or rewrite it; this is the killer feature.
  • include_thoughts - default true, and it's the reason there's a separate reasoning output. Reasoning tokens are where the model thinks out loud; if you only want the answer, flip this off and save the tokens.
  • reasoning_effort - low or high (default high). Low is faster/cheaper for routine jobs.
  • enable_google_search - off by default. It's mutually exclusive with response_format_json - pick one.
  • response_format_json - paste a JSON schema here and the model returns structured output, which is what you want when the output feeds other nodes.
  • stream - default true; responses stream but you still get the complete result back.

Outputs: text (the reply), reasoning (the thought trace, empty if thoughts are off), and data (the last response chunk as JSON).

Installing

Part of the pack, installed once. ComfyUI Manager: search "ComfyUI Kie API". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/gateway/ComfyUI-Kie-API
# restart ComfyUI

No model files. API key at config/kie_key.txt in the pack folder (copy from kie_key.example.txt).

Where people get burned

Two input landmines: enable_google_search and response_format_json are mutually exclusive - set both and you'll fight the API. And if you fill messages_json, the prompt/role/media inputs get overridden entirely, which surprises people who fill both and wonder why the image never made it in. Cost is the other one: high reasoning with thoughts enabled is the expensive combo, and it's the default. Draft with low effort and thoughts off; switch to the heavy settings when you actually need the model to think.

Categorykie/api

Inputs (13)

NameTypeDefaultDescription
modelCOMBOgemini-3-pro4 options: gemini-3-pro, gemini-3-flash, gemini-2.5-pro, gemini-2.5-flash
promptSTRING
roleCOMBOuser5 options: developer, system, user, assistant, tool
imagesoptIMAGE
videooptVIDEO
audiooptAUDIO
streamoptBOOLEANtrue
include_thoughtsoptBOOLEANtrue
reasoning_effortoptCOMBOhigh2 options: low, high
enable_google_searchoptBOOLEANfalse
messages_jsonoptSTRING
response_format_jsonoptSTRING
logoptBOOLEANtrue

Outputs (3)

NameTypeDescription
textSTRING
reasoningSTRING
dataSTRING