Gemini 3 Flash (openai)
The cheapest Gemini card, on the API shape you already know
- text
- raw_json
- credits_consumed
- usage_json
- credits_left
Two cards ship for Gemini 3 Flash in this pack: the native route and this one, the OpenAI-compatible chat-completions route. Same model, same Flash tier pricing, different JSON dialect on the wire. If your tool definitions, your client code, or your muscle memory come from OpenAI's shape, use this card and skip the translation step.
Where it fits
Upstream of generation, doing text work. A prompt enhancer, a caption rewriter, a tag cleaner, a JSON repair step. The KB makes the case for small-and-obedient over big-and-clever for exactly this - the job is format-following, not reasoning, and a model that deliberates out loud tends to hand you its deliberation as prompt tokens.
The other reason to route through KIE at all is price. It's a marketplace reselling closed models, and people building Comfy nodes against it have been publicly comparing its rates with Comfy's own official API nodes - one widely posted comparison had Nano Banana Pro at roughly $0.09 per image through KIE's route versus about $0.15 through the first-party one. Treat any specific number as stale within a month, but the direction of the gap is why this whole pack exists.
Inputs worth setting
prompt is the only required field: your message, in a wide multiline box.
The optional ones that matter:
- system_prompt - pin the output format. "Return only the finished prompt, no preamble" is the single highest-value line you'll type in this node.
- history_json - a JSON array of prior messages. No state lives on the node, so multi-turn means carrying the transcript yourself.
- tools_json - function definitions in OpenAI's shape. KIE's page documents the usual weather/stock-price examples, so it's a genuine tool-calling surface.
- stream - default off. On, KIE streams events and the pack normalises them into one response; you don't get live typing in ComfyUI, so there's little reason to switch it on.
- expert_override_json - a raw payload merge, for debugging only.
No image input on this card. It's text in, text out.
Outputs and wiring
text is the one you connect - a plain STRING into whatever wants a prompt. raw_json holds the untouched response and is where you look when text looks truncated or strange. usage_json is token accounting. credits_consumed and credits_left are floats, and the node paints its own "credits spent / left" receipt after a good run, which is a nicer way to watch a batch than wiring a float into anything.
A pattern that holds up: one text node for the rough idea, this node to rewrite it with a format contract in the system prompt, and a second instance of it further down for a short critique pass. Narrow steps drift less.
Install
ComfyUI Manager can find the pack by its title. Otherwise:
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt
Restart ComfyUI. The requirements are requests, Pillow, numpy, PyYAML and nothing else - no model downloads, no local inference, no VRAM cost. The install is genuinely light; the meter runs on the API side.
One-time key: Settings → KIE.ai Nodes Next → Connection, then Paste / replace KIE.ai API key. It's verified against KIE before overwriting a working key and you get a masked fingerprint and CONNECTED status. Headless? Set KIE_API_KEY; the environment variable takes priority over anything saved in the UI.
Gotchas
Two near-identical cards in the menu. The native and OpenAI-route versions of the same model both appear. Check for the (openai) suffix rather than concluding the install duplicated itself.
The menu is generated, not shipped. On startup the pack reads KIE's API docs and builds a node per callable model, with a lightweight check about every 24 hours; the bundled bootstrap covers a short list until the first full sync, which reloads your frontend once. Missing cards are usually a sync question.
Reseller catalogue churn. Models and model IDs move on KIE's side faster than any plugin release. If a card that used to work starts erroring, refresh the catalogue before you rebuild the workflow.
Streaming isn't visible. If you turned stream on expecting to watch the answer arrive, you won't. The response lands as one document either way.
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 | — |