Gemini 2.0 Flash gets a conversational paintbrush
A Next.js quickstart that lets you generate and refine images by chatting with Gemini 2.0 Flash in natural language.

What it does
This quickstart wraps the Gemini 2.0 Flash API in a Next.js chat interface. Users generate images from text prompts or upload existing ones and edit them with natural language instructions, while the app maintains conversation context across turns. It is essentially a polished frontend layer over the Google Generative AI JavaScript SDK, built with shadcn/ui components.
The interesting bit Instead of treating image generation as a one-shot prompt, the app frames it as a continuous dialogue with the model, letting you iteratively refine visuals without restating the entire context each time. That mirrors how Gemini handles multimodal tokens natively, making the UI feel less like a form submission tool and more like an art-director conversation.
Key highlights
- Native image generation and editing through a single model call to Gemini 2.0 Flash.
- Multi-turn conversation history for context-aware refinements.
- Responsive UI built with Next.js and
shadcn/ui. - Hosted demo available on Hugging Face Spaces for immediate testing.
- Direct SDK snippet included for developers who want to bypass the UI entirely.
Caveats
- The sample code targets
gemini-2.0-flash-exp, an experimental model. - The README does not mention pricing, rate limits, or error handling beyond a basic
console.errorcatch block. - It is unclear how conversation history is stored; the README highlights context across turns but never mentions persistence or session management.
Verdict Grab this if you want a drop-in UI reference for Gemini’s native image capabilities or a starting point for a chat-driven image editor. Skip it if you are looking for a headless SDK guide—the README already gives you that in a standalone snippet.
Frequently asked
- What is google-gemini/gemini-image-editing-nextjs-quickstart?
- A Next.js quickstart that lets you generate and refine images by chatting with Gemini 2.0 Flash in natural language.
- Is gemini-image-editing-nextjs-quickstart open source?
- Yes — google-gemini/gemini-image-editing-nextjs-quickstart is open source, released under the Apache-2.0 license.
- What language is gemini-image-editing-nextjs-quickstart written in?
- google-gemini/gemini-image-editing-nextjs-quickstart is primarily written in TypeScript.
- How popular is gemini-image-editing-nextjs-quickstart?
- google-gemini/gemini-image-editing-nextjs-quickstart has 539 stars on GitHub.
- Where can I find gemini-image-editing-nextjs-quickstart?
- google-gemini/gemini-image-editing-nextjs-quickstart is on GitHub at https://github.com/google-gemini/gemini-image-editing-nextjs-quickstart.