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

Gemini 3.5 Flash

Why this node may error until the catalog syncs

By felipederosilva·Created about a month ago·Updated a day ago· 3
Gemini 3.5 Flash
    • text
    • raw_json
    • credits_consumed
    • usage_json
    • credits_left
    ◄prompt►
    ◄system_prompt►
    ◄streamfalse►
    ◄tools_json[]►
    ◄history_json[]►
    ◄expert_override_json{}►

    There are two Gemini 3.5 Flash nodes in this pack. One is called Gemini 3.5 Flash, the other Gemini 3.5 Flash (openai), and if you're wondering which to click, the answer is the one with the suffix - because this node, the unsuffixed one, is the one that tends to greet you with an endpoint error on a fresh install.

    Here's what's going on. KIE publishes two documentation pages per Gemini model: the native Gemini-format page and an OpenAI-compatible route. The pack generates a node per page, calling the route it found. The (openai) pages resolve cleanly into an endpoint; the native-format pages sometimes don't, and the node ships with a skeleton definition and an empty endpoint. Run it in that state and you get a message telling you the endpoint hasn't been resolved and to refresh the live catalog.

    What to do about it

    Restart ComfyUI, or run the pack's catalog refresh node, and it re-reads KIE's documentation index and enriches the model definitions. The pack checks for catalog changes at most once every 24 hours by default, so a model page that got fixed on KIE's side shows up on its own eventually. If it still doesn't resolve, use the (openai) twin - same model, same inputs, an endpoint that's already known.

    That's not a broken install. It's the tradeoff of a pack that builds its node list from a live documentation catalog instead of hard-coding it: new models appear without a plugin release, and occasionally one arrives before its page has a machine-readable endpoint.

    How the node works once it's talking

    It's a chat completion. Your prompt becomes a messages array, the request goes to KIE, and the reply is parsed into one text string. No image socket, no sampling on your machine, nothing to download - the model lives on Google's side and you pay per call.

    Inputs

    prompt is required. system_prompt is where the job lives, and where you suppress the chatty wrapper that would otherwise end up as literal prompt tokens downstream.

    history_json takes a prior-messages array, passed through as-is - multi-turn is possible, you just manage the array yourself. It's also the only multimodal route on this node, since the pack doesn't declare an image input for the Gemini family.

    tools_json is an OpenAI-style function-definition array, [] when you're not using tools. stream is off by default and doesn't produce live token output here; the pack reassembles a streamed response into a single string. expert_override_json is the raw-request escape hatch for fields KIE hasn't documented.

    Outputs

    text for whatever consumes the reply. raw_json for the full response, usage_json for token accounting, and credits_consumed / credits_left as floats - also written onto the node after each run so you can see spend without leaving the canvas.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
    

    Or search "KIE.ai Nodes Next" in ComfyUI Manager. Restart after installing. Dependencies are requests, Pillow, numpy, PyYAML. Set your key once in Settings → KIE.ai Nodes Next → Connection: validated against KIE before it's saved, stored in ComfyUI's user config rather than your workflow, masked in the UI. Headless installs can set KIE_API_KEY, which takes priority over the saved key.

    Small print worth reading

    • A Flash model is the right tier for high-volume in-graph work - rewriting prompts, cleaning tags, turning captions into structured text. It's the wrong tier for long-form reasoning; that's the Pro node's job.
    • Every call is billed, including the failed ones you retry. Test with one short prompt before you wire an LLM into a loop that runs on every generation.
    • Local still wins on cost and censorship, and that's the honest reason the KB's LLM-in-ComfyUI guidance puts local abliterated models first. The API tier here exists for the work a small local model can't do, not as a default.
    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—