A custom node for ComfyUI that integrates Google's Gemini AI models for image analysis and description. This node allows you to send images to Gemini API and get AI-generated descriptions or analysis based on your prompts.
Updated to latest version. Added support latest version of gemini models.
- Support for multiple Gemini models:
- gemini-2.5-pro-exp-03-25
- gemini-2.0-flash-exp
- gemini-2.0-flash-thinking-exp-01-21
- Configurable safety filters
- Streaming response support
- Custom API key configuration
- Image to text generation
1)gemini-2.5-pro-exp-03-25:
-Requests per minute (RPM) - 5
-Requests per day (RPD) - 1,000,000
-Tokens per minute (TPM) - 25
2)gemini-2.0-flash-exp
-Requests per minute (RPM) - 10
-Requests per day (RPD) - 1,000,000
-Tokens per minute (TPM) - 1500
3)gemini-2.0-flash-thinking-exp-01-21
-Requests per minute (RPM) - 10
-Requests per day (RPD) - 1,000,000
-Tokens per minute (TPM) - 1500
- Navigate to your ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes/
- Clone this repository:
git clone https://github.com/Merserk/ComfyUI-GeminiAPI-Latest.git
- Install the required dependencies:
pip install -r requirements.txt
- Create a
config.json
file in the node directory with your Gemini API key:
{
"GEMINI_API_KEY": "your-api-key-here"
}
- Start ComfyUI
- Find the "Gemini API" node under the "Gemini" category
- Connect an image input to the node
- Configure the following parameters:
prompt
: Your text prompt for image analysismodel_name
: Select the Gemini model to useapi_key
: (Optional) Override the default API keystream
: Enable/disable response streamingsafety_filter
: Enable/disable content safety filters
You can configure the API key in two ways:
- Add it to
config.json
file - Input it directly in the node parameters