Gemini 2.5 Unified API (Creepybits)
Put Gemini 2.5 inside your graph — text and images both
- image
- text
This is the engine room of the whole Creepybits suite - the node the author calls the "brain." Gemini 2.5 Unified API sends whatever you give it to Google's Gemini models and returns the response as a string. The entire "AI prompt engineering" side of the pack (Master Key, Evaluater, Keyword Extractor, all of it) exists to feed text or images into this one node.
You reach for it when you want an LLM inside your generation pipeline: take a rough idea, have Gemini expand it into a detailed Flux-style prompt, then feed that straight into your CLIP encoder. Or drop an image into its image input and get a caption, a critique, or a keyword list back. It's the difference between hand-writing prompts and having a writing partner who never gets bored.
How it works
It uses Google's google-genai SDK. On each run it builds your message from system_prompt, the optional user_instructions, and an optional image, then calls the selected model with your sampling settings. If you pass an image, it converts the tensor to a PIL image and - if you set resize_image_to - shrinks it to 512/768/1024 with LANCZOS before sending. That resize knob exists because smaller images are cheaper and faster to send, and for most prompt-analysis tasks you don't need full resolution.
The model dropdown offers gemini-2.5-flash-lite (cheap, fast) and gemini-2.5-flash (smarter). Both are solid for prompt work; flash-lite is plenty for "expand this idea into a prompt."
Inputs you'll actually touch
system_prompt- your mission briefing. This is where a Master Key or Evaluater output plugs in.model- flash-lite or flash.max_output_tokens,temperature,top_p,top_k,seed- the usual LLM knobs. Temperature up for creative prompt-writing, down for extraction tasks.api_key_selection- dropdown of keys you've configured (see below).image(optional) - the multimodal input. The whole reason this node can critique your renders.
Output is a single STRING named text, ready for any text input downstream.
The API key setup - where everyone trips
This is the part that gets people. The node reads an API key from a JSON config file, but the config path is a constant baked into the source:
API_CONFIG_PATH = r"C:\PATH\TO\YOUR\API_KEY\api_keys_config.json"
That's a placeholder. Until you do something about it, api_key_selection shows literally "Config not found", and you'll get Error: API key not found. The repo does ship a sample config at assets/scripts/api_keys_config.json - you just have to point the constant at it (or place your config at the placeholder path). The sample format:
{
"Gemini Free": "C:\\PATH\\TO\\YOUR\\FREE\\API\\KEY\\gemini_api_key_free.txt",
"Gemini Paid": "C:\\PATH\\TO\\YOUR\\PAID\\API\\KEY\\scripts\\gemini_api_key_paid.txt"
}
Each value points to a plain text file containing the actual key. You can name the entries anything - the dropdown is built from the JSON keys.
Installing it
In ComfyUI-Creepy_nodes, so:
- ComfyUI Manager: search "Creepy_nodes" and install.
- Manual:
cd ComfyUI/custom_nodes git clone https://github.com/Creepybits/ComfyUI-Creepy_nodes.git
Restart ComfyUI. This node is the reason the pack's requirements.txt includes google-genai - if you cloned manually and it isn't installed, run pip install google-genai.
Troubleshooting
Beyond the key path, the two most common issues: safety blocks and quiet failures. The default safety_threshold is "Block None", which loosens Gemini's content filters - set it higher if you're hitting blocks and want more censorship, not less. And note that on any API error the node returns the error text as a normal string rather than raising, so a failed call looks like successful output to everything downstream. If your prompts suddenly contain API Error: text, that's what happened.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| system_prompt | STRING | — | |
| model | COMBO | 2 options: gemini-2.5-flash-lite, gemini-2.5-flash | |
| max_output_tokens | INT | 10241–8192 | — |
| temperature | FLOAT | 0.90–2 | — |
| top_p | FLOAT | 0.900–1 | — |
| seed | INT | 00–18446744073709550000 | — |
| top_k | INT | 501–100 | — |
| api_key_selection | COMBO | 1 options: Config not found | |
| user_instructionsopt | STRING | — | |
| imageopt | IMAGE | — | |
| resize_image_toopt | COMBO | None | 4 options: None, 512, 768, 1024 |
| thinking_modeopt | COMBO | disable | 2 options: disable, enable |
| safety_thresholdopt | COMBO | Block None | 4 options: Block None, Block Low, Block Medium, Block High |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |