Nodes/ComfyUI-YogurtNodes/Provider: Google AI Studio
ComfyUI Node

Provider: Google AI Studio

The AI Studio Provider

By yogurt7771·Created 2 years ago·Updated 6 days ago· 3
Provider: Google AI Studio
    • provider
    ◄api_key►
    ◄proxy_url►
    ◄timeout0►

    The shortest useful description: this is the node that lets you stop retyping your Gemini key. It's the provider half of the pack's Google setup, and one provider wire off it feeds both Gemini Chat and Nano Banana - text, vision and image generation from a single credential.

    That's the normal shape of this pack's LLM layer: provider nodes hold connection settings, model nodes hold the model list and parameters. A provider never generates anything; it's a routing key plus your key. If you've used the ComfyUI API nodes, think of it as the same split, except here you're using your own key against Google's API rather than buying credits through Comfy.

    Fields

    Three, and the interesting thing is what isn't there - no base_url. The endpoint is Google's, fixed. If you need to point Gemini-shaped requests somewhere else, that's what Provider: Google GenAI Compatible is for.

    • api_key - blank is fine. Resolution is field → gemini in api_key.json → GEMINI_API_KEY. Miss all three and the node fails with a message naming the two fallbacks.
    • proxy_url - http://127.0.0.1:7890, socks5://127.0.0.1:1080. In practice the reason most people touch this node at all is being somewhere Google's API is awkward to reach directly.
    • timeout - seconds, 0 = no limit. Image generation through Nano Banana can run past a minute; leave it alone unless you have a specific reason.

    Output is a single provider socket.

    Why you'd wire it instead of leaving the socket empty

    Because the model nodes default to Google AI Studio anyway when nothing's connected - same key, same JSON entry. So connecting this node changes nothing at first glance, which confuses people. Two real reasons to do it:

    You want the config visible in the graph. A provider node is a piece of the workflow you can look at and understand. An implicit default is a thing you have to remember.

    You want to swap destinations without touching the model node. Today Google's API, tomorrow a compatible relay, the day after a proxy'd route - one wire changes, the downstream node and its settings stay put. That's the entire argument for the provider/model split, and it's a good one when you're comparing routes on cost or filtering.

    For Nano Banana specifically, the pack routes different model versions through different platforms, and Google AI Studio is where the official model IDs live. Wire it, and the model node's dropdown entries all resolve. Wire something that doesn't carry the version you selected, and the error names the providers that do - that's the pack being helpful rather than clever.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes
    cd ComfyUI-YogurtNodes
    pip install -r requirements.txt
    

    google-genai is in that list - if you install with pip install -r requirements.txt and skip the restart, you'll get an import error rather than a graceful message.

    Key file, custom_nodes/ComfyUI-YogurtNodes/yogurt_nodes/llm/api_key.json:

    { "gemini": "AIza..." }
    

    Keep this file out of anything you share. Workflows get posted in screenshots and on Civitai constantly, and a key pasted into a widget saves straight into the JSON.

    What to expect

    Google's image and text APIs filter, and no amount of safety_level tweaking in the model node changes what the model will do - it only changes what the API reports as blocked. Google is, per the KB's own summary, among the most aggressively censored of the closed vendors (see the KB's google.json panel). For enhancement and captioning work that's rarely a problem. For anything on the edge, it will be the wall you hit, and the local path is the answer - which is a different node in a different pack.

    On cost: nothing about this provider node is metered, but every Nano Banana call downstream is. Wire responsibly.

    CategoryYogurtNodes/LLM/Providers

    Inputs (3)

    NameTypeDefaultDescription
    api_keySTRINGLeave empty to use 'gemini' from api_key.json, then the GEMINI_API_KEY environment variable.
    proxy_urlSTRINGProxy URL, e.g. http://127.0.0.1:7890 or socks5://127.0.0.1:1080.
    timeoutINT00–3600Request timeout in seconds; 0 means no limit.

    Outputs (1)

    NameTypeDescription
    providerYOGURT_LLM_PROVIDER—