Gemini API
Connect ComfyUI to Google Gemini
- llm_api
This is the connection node for Google Gemini. In the art-venture LLM pattern it's the piece that holds your API key and points at Google's endpoint, then hands out an LLM_API handle that the Chat and Completion nodes plug into. Gemini does both text and image generation, so this one node is the gateway to two different jobs: text tasks (paired with LLM API Config) and image generation via Gemini's image model (paired with NanoBanana API Config).
If you want an LLM to write or expand prompts inside your graph, or you want Gemini to actually generate an image, this is where the connection starts.
How it fits together
Three nodes make a working LLM call: this API node (credentials), a Config node (model + settings), and a Chat or Completion node (the run). This node's only job is the first one - authenticate and expose an LLM_API. Wire that handle plus a config into LLM Chat, build your messages, and run.
The inputs and outputs
- gemini_api_key (
STRING) - your Google Generative Language API key. You get one free from Google AI Studio; paste it here. - endpoint (
STRING) - defaults tohttps://generativelanguage.googleapis.com/v1beta. Leave it unless you're deliberately routing through a proxy or a different API version. - llm_api (output) - the connection handle for the Chat/Completion nodes.
Two fields, one output. It's a small node with an important job.
Installing it
ComfyUI Manager → search comfyui-art-venture → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/sipherxyz/comfyui-art-venture
then restart ComfyUI. Pre-installed on comfy.icu.
Common issues, and one that actually matters
Missing-node red? The art-venture pack isn't installed - Manager's "Install Missing Custom Nodes" resolves it.
Now the important one. Your API key gets typed into a node field, and node field values are saved inside the workflow. That means if you save this graph or embed it in an output PNG and share it - which is the whole culture of ComfyUI, "workflow included" - you may be handing out your Gemini key. Scrub the key before you share a workflow, every time. Custom nodes and their credentials have a genuinely bad security history in this ecosystem; leaking your own key into a shared file is the easy mistake to not make.
Functionally, the usual failures are a bad or unauthorized key (Chat node errors, not this one - the API node doesn't validate on its own), a model your key can't access, or hitting Google's free-tier rate limits. If calls fail, test the key against the specific model you configured before assuming the node is broken. And network access is required - this is a cloud call, so an offline or firewalled executor won't reach it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| gemini_api_key | STRING | — | |
| endpoint | STRING | https://generativelanguage.googleapis.com/v1beta | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| llm_api | LLM_API | — |