Gemini 4 Argon
The native-schema Gemini node, explained without the JSON
- text
- raw_json
- credits_consumed
- usage_json
- credits_left
There are two Gemini 4 Argon nodes in this pack, and the difference between them is the thing that confuses everyone: this one talks to KIE's native Gemini endpoint, the other one talks to an OpenAI-compatible wrapper around the same model. Same brain, different request shape. Functionally you can get similar output from either. The reason to care is what each one does with your history, your system prompt and your tool definitions - the native one uses Gemini's contents/parts structure, so the shapes of the JSON fields you paste in are Gemini-shaped.
Pick this one when you're feeding it straight prompts and want the plainest path to a text output. Pick the (openai) twin when you already have OpenAI-style message arrays or tool schemas lying around.
How it works
The node posts to a Gemini-native path (.../gemini-4-argon:streamGenerateContent), and the pack adapts its UI onto that contract for you: your prompt becomes a user turn with a text part, history_json entries get their role mapped to Gemini's vocabulary (anything assistant-ish becomes model), and system_prompt becomes a systemInstruction rather than a fake turn. tools_json is passed through as Gemini tools. The response is parsed, and the text is flattened into the text output.
One nice detail buried in the client: Gemini-native paths authenticate with a Google-style X-Goog-Api-Key header instead of KIE's usual bearer token. You don't do anything about it - but it's why a request that works here can fail if you try to reproduce it with a generic HTTP node and the wrong header.
Inputs
- prompt - required, multiline. Your message.
- system_prompt - becomes
systemInstruction. Use it for the output contract. - history_json - optional,
[]by default. Gemini's chat shape is not OpenAI's; keep it empty unless you're deliberately continuing a conversation. - tools_json - optional function/tool definitions in the schema this endpoint documents.
[]for normal use. - stream - there's a widget, and the underlying endpoint is a streaming one, but either way you receive a single finished string. Leave it off.
- expert_override_json - request-level overrides merged into the body. An escape hatch for fields KIE documents but the pack hasn't mapped. Not a tuning knob.
Outputs: text, raw_json, usage_json, credits_consumed, credits_left.
Notice what's not there: no images socket, no max_tokens. If you want to hand Gemini a picture, this node won't do it - the pack's OpenAI-shaped nodes expose an image input, this one doesn't.
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
Manager search: "KIE.ai Nodes Next" (or comfy node install kie-ai-nodes-next). Requirements are requests, Pillow, numpy, PyYAML - nothing to download, nothing that touches the GPU. Key setup is Settings → KIE.ai Nodes Next → Connection, validated against KIE before it's saved, stored in ComfyUI's user config directory rather than the workflow.
First launch triggers a catalog sync that rebuilds the node library from KIE's docs and reloads the frontend once. That's why the LLM folder looks enormous and slightly redundant - every documented model variant gets its own node, on purpose.
Practical notes
The LLM preflight is strict and runs locally: an empty prompt, malformed history_json/tools_json, or out-of-bounds token settings are rejected before anything is uploaded or billed. That's most of what a beginner would otherwise hit as a mystery provider error.
If KIE's docs are unreachable at startup, the cached library keeps working. If KIE's balance endpoint is down, you still get your text and the node just reports the balance as unavailable.
And the usual two honest caveats. This node doesn't run until its text output is wired into something executable, so a dangling node silently does nothing. And the prompt leaves your machine: KIE forwards it to Google, whose filter you can't remove. For prompt enhancement with no censorship, that's the argument for a local abliterated model over this - free per call, offline, and unwilling to refuse. Use a hosted Gemini tier when the text work is genuinely harder than adjective selection.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | User prompt / message. | |
| system_promptopt | STRING | — | |
| streamopt | BOOLEAN | false | — |
| tools_jsonopt | STRING | [] | Optional function/tool definitions supported by this model endpoint. |
| history_jsonopt | STRING | [] | Optional prior message/input array as JSON. |
| expert_override_jsonopt | STRING | {} | Expert-only request overrides. Normal use does not require this. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| usage_json | STRING | — |
| credits_left | FLOAT | — |