Author: Justin Miller Support This Project: Buy Me A Coffee
Gemini 2.0 Flash Preview Image Generation in the Gemini API will be discontinued on November 12, 2025. You can still use the tool and use their other image generation models, for example, gemini-2.5-flash-image, but as of today, they don't have any models that offer image generation in the free tier.
Gemini has updated the 2.0 image generation to "Preview" from "Experimental."
This toolkit integrates Google's powerful (and experimental) gemini-2.0-flash-preview-image-generation model directly into Open WebUI, allowing you to generate images based on text prompts within your chat interface.
Leveraging the Gemini API, this tool can generate images and potentially accompanying text in response to your prompts. The results (both image and text, if generated) are displayed directly in the Open WebUI chat.
Note: This tool utilizes the gemini-2.0-flash-preview-image-generation model, which is currently experimental [0, 1]. Google documentation notes that for this specific model, the response modalities must include both "Text" and "Image" [1]. This toolkit handles that configuration automatically.
google-genaigoogle-generativeaiPillowpip install google-genai google-generativeai Pillow
.py) into your Open WebUI tools directory as a new tool, or grab it from the Open WebUI Communityapi_key field. This is required for the tool to function.image_format (default is png).model_name if Google updates or changes the experimental model endpoint.Once installed and configured, you can invoke the tool within Open WebUI like any other tool.
Example prompt:
Generate an image of a futuristic cityscape at sunset
The tool will:
gemini-2.0-flash-preview-image-generation model is explicitly marked as experimental by Google. Its availability or behavior may change.Enjoy generating images directly within Open WebUI!
Open WebUI Enterprise — White-labeling, SSO, and dedicated support for your team.