Nodes/KIE.ai Nodes Next/Gemini 3 Flash
ComfyUI Node

Gemini 3 Flash

The workhorse text node you'll stop thinking about

By felipederosilva·Created 2 months ago·Updated 13 days ago· 4
Gemini 3 Flash
    • text
    • raw_json
    • credits_consumed
    • usage_json
    • credits_left
    ◄prompt►
    ◄system_prompt►
    ◄streamfalse►
    ◄tools_json[]►
    ◄history_json[]►
    ◄expert_override_json{}►

    This is the original Flash-generation card - the plain-named one, on KIE's native Gemini route rather than the OpenAI-compatible (openai) variant. It's the oldest and cheapest member of the Gemini family in this pack, and for a lot of graphs it's the right one to leave in place once it works.

    What you'd reach for it for

    Three jobs cover nearly all real usage. Turning a rough idea into a structured prompt. Turning a description into the specific house style your model wants. Cleaning up text that another node produced - tags that need deduping, a caption that needs rewriting into natural language, a JSON blob that needs to be valid.

    None of those need a frontier model. The KB's LLM-in-the-graph write-up makes the argument better than I can: an 8B local abliterated model is enough for enhancement and captioning, and the reason people still route to an API is quality when they don't care about local or NSFW. A Flash tier is the cheap end of that API path. It's the node you call forty times while tuning a prompt, not the one you call once for a hero image.

    The inputs, honestly

    Required: prompt. That's the message. It's a multiline box, so write it like prose.

    Optional and meaningful:

    • system_prompt - the format contract. This is where you say "reply with the prompt only, no commentary." Do that; an LLM's chat habits land in your conditioning otherwise.
    • history_json - JSON array of previous messages. The node keeps no state between runs, so a multi-turn exchange means resending the transcript.
    • tools_json - function/tool definitions for the endpoint, if you're doing tool calls. Default [] is fine.
    • stream - off by default; on, KIE returns a stream the pack normalises into the response document. You won't see incremental text in the UI.
    • expert_override_json - raw body overrides for debugging. You should never need it.

    Note there's no image socket. This card is text-only; if you want a model to look at a picture, that's a different family in this pack.

    Outputs

    text - the STRING you wire downstream: a CLIP text encode, another node's prompt field, a text saver. raw_json - the full response, your debugging surface when the answer isn't where you expected it. usage_json - token counts. credits_consumed and credits_left - floats, plus the on-node credits receipt the pack draws after a successful run.

    If you're chaining two of these (rewrite, then critique), keep each one narrow. Two tightly scoped calls drift far less than one open-ended one - that's the most useful lesson in the KB's section on this pattern.

    Install

    Through ComfyUI Manager (search the pack title), or:

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

    Restart afterwards. requests, Pillow, numpy, PyYAML - that's the entire dependency story. No checkpoints, no CUDA context, no VRAM. Everything happens on KIE's side and you pay per call.

    Then Settings → KIE.ai Nodes Next → Connection, paste the key into Paste / replace KIE.ai API key. It gets validated before it's saved and you see a masked fingerprint plus a CONNECTED status. On a headless box, KIE_API_KEY in the environment wins over the saved value.

    Where it goes wrong

    Empty text. Usually a shape surprise in the response rather than a failed call. Check raw_json first; the pack extracts text by walking known output fields.

    You forgot the format contract. The single most common quality complaint about any LLM-in-a-graph setup, and it's a system-prompt problem, not a model problem.

    Menu changes after a restart. The pack builds its node library from KIE's live API documentation at startup and re-checks about once a day, so cards can appear, rename, or vanish between ComfyUI restarts - model versions come and go on a marketplace faster than any plugin ships. An older card disappearing from the list is normal upstream churn, not a broken install.

    Cost creep. Flash is cheap per call and you will call it a lot in a loop. The credits receipt on the node is there for exactly that reason - glance at it before you queue a hundred-run batch.

    CategoryKIE Next/LLM/Google/Gemini

    Inputs (6)

    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.
    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—