KIE Gemini (LLM) [Experimental]
KIE Gemini (LLM) [Experimental]
- images
- video
- audio
- text
- reasoning
- data
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-proby default, with 2.5/3 Pro/Flash options. - prompt - required if
messages_jsonis empty. Your instruction, plus whatever you've wired into the media inputs. - role -
userdefault; 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
reasoningoutput. Reasoning tokens are where the model thinks out loud; if you only want the answer, flip this off and save the tokens. - reasoning_effort -
loworhigh(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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | gemini-3-pro | 4 options: gemini-3-pro, gemini-3-flash, gemini-2.5-pro, gemini-2.5-flash |
| prompt | STRING | — | |
| role | COMBO | user | 5 options: developer, system, user, assistant, tool |
| imagesopt | IMAGE | — | |
| videoopt | VIDEO | — | |
| audioopt | AUDIO | — | |
| streamopt | BOOLEAN | true | — |
| include_thoughtsopt | BOOLEAN | true | — |
| reasoning_effortopt | COMBO | high | 2 options: low, high |
| enable_google_searchopt | BOOLEAN | false | — |
| messages_jsonopt | STRING | — | |
| response_format_jsonopt | STRING | — | |
| logopt | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| reasoning | STRING | — |
| data | STRING | — |