gemini-image-editing-nextjs-quickstart  by google-gemini

Next.js quickstart for Gemini 2.0 Flash image generation/editing

created 4 months ago
481 stars

Top 64.6% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a Next.js quickstart for integrating Google's Gemini 2.0 Flash model for native image generation and editing. It targets developers looking to build applications that allow users to create images from text prompts or modify existing images via natural language, maintaining conversational context for iterative refinements.

How It Works

The project leverages the Google Generative AI JavaScript SDK to interact with Gemini 2.0 Flash. It supports text-to-image generation by sending text prompts to the model and image editing by providing an image along with natural language instructions. The architecture maintains conversation history, enabling context-aware iterative image modifications.

Quick Start & Requirements

  • Install dependencies: npm install
  • Run development server: npm run dev
  • Requires a GEMINI_API_KEY from Google AI Studio.
  • Local development: Node.js (version not specified, but typically LTS).
  • Deployment: Docker image available, or deployable on Vercel.
  • Demo: Hosted demo available on Hugging Face Spaces.

Highlighted Details

  • Text-to-image generation using Gemini 2.0 Flash.
  • Image editing via natural language instructions.
  • Conversation history for context-aware refinements.
  • Responsive UI built with Next.js and shadcn/ui.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.

Licensing & Compatibility

Licensed under the Apache License 2.0. This license is permissive and generally compatible with commercial and closed-source applications.

Limitations & Caveats

The README does not specify version requirements for Node.js or detail any known limitations or bugs of the Gemini 2.0 Flash model itself within this quickstart.

Health Check
Last commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
44 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.