Nodes/KIE.ai Nodes Next/Gemini 3.8 Flash (openai)
ComfyUI Node

Gemini 3.8 Flash (openai)

Same model, OpenAI-shaped request — when that matters

By felipederosilva·Created about a month ago·Updated about 22 hours ago· 3
Gemini 3.8 Flash (openai)
    • 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.8 Flash cards in this pack and they are the same model. The difference is the transport: this one is served over an OpenAI-compatible chat-completions route, which is what the (openai) suffix is telling you. If you don't care about request dialects, pick either and move on. If you're moving a prompt-enhancer setup over from somewhere else, this is the one that takes the JSON you already have.

    What it does in a graph

    It sits upstream of generation and turns text into better text. That's the whole job: your rough idea in, a structured paragraph out, feeding a CLIP text encode or the prompt field of a model node. The KB's LLM-in-ComfyUI doc draws the line clearly - this is not the language model inside your checkpoint, the frozen encoder that every sampler pass runs through. This is a tool you bolt on before the sampler, and it costs per call.

    Where it differs from the native-route card: the request body follows OpenAI's chat-completions convention, and so do the tool definitions. KIE's docs for this page spell that out with the standard get_current_weather / get_stock_price function-calling examples. Practically, that means a JSON function schema you wrote for an OpenAI endpoint drops in here unchanged - useful if your enhancement step involves a tool call, or if you're driving ComfyUI from a script that already speaks that dialect.

    On cost: KIE.ai is a marketplace reselling closed models, and price is why people route through it rather than a first-party node. Public comparisons in the community have put KIE's Nano Banana Pro rates meaningfully under Comfy's official API-node pricing, which is the same calculus that justifies spending $10 there and testing before committing.

    Inputs that matter

    prompt - required. The user message, wide multiline box, no surprises.

    system_prompt - the format contract. Worth repeating: a chat model that isn't told otherwise will open with "Certainly! Here is an enhanced prompt," and that sentence becomes tokens in your conditioning. Say output only the prompt here.

    history_json - a JSON array of prior turns. There's no session state on the node, so continuity is manual.

    tools_json - function definitions. [] if you're not using tools.

    stream - off by default; on, it makes KIE return an SSE stream that the pack flattens into the response. No live typing in the UI.

    expert_override_json - raw overrides merged into the body. Diagnostic tool.

    Outputs

    text is what you wire: a STRING straight into the next node's prompt field. raw_json is the full response and the first place to look when the text output looks wrong. usage_json gives token accounting. credits_consumed and credits_left come out as floats, and the node also renders its own credits receipt after each run so you can watch a batch drain your balance without wiring anything up.

    Install

    ComfyUI Manager, search the pack title, or by hand:

    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 afterwards. Requirements are requests, Pillow, numpy, PyYAML - no weights, no local GPU work, nothing to configure beyond the API key.

    Key: Settings → KIE.ai Nodes Next → Connection → Paste / replace KIE.ai API key. The pack validates it against KIE before overwriting a key that already works, then shows a masked fingerprint and a CONNECTED status. For servers, set KIE_API_KEY in the environment - it outranks the saved key.

    Gotchas

    Duplicate-looking cards in the node menu. Because KIE publishes both the native and OpenAI-compatible routes for the same model, you get two cards with nearly the same name. That's not a botched install; check the (openai) suffix or search the class name.

    The card list is generated from KIE's docs at startup, with a light re-check about once a day, and the offline bootstrap only covers a handful of models until the first deep sync finishes - which reloads your frontend once. A brand-new card that isn't in the menu yet usually means "wait for sync," not "reinstall."

    Model churn is real on a reseller. Prices and availability move, and models do get pulled. If a card suddenly errors, refresh the catalogue before assuming the node is broken.

    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—