A simple React-based web app that generates images from text prompts using Google's Gemini 2.0 Flash Preview Image Generation API. Includes modern UI and the ability to download generated images.
- ๐ง Text-to-Image Generation via Gemini 2.0 Flash API
- ๐ฅ Download Generated Images in PNG format
- ๐จ Clean, Responsive UI using Flexbox
- โ Graceful handling of empty input and API errors
- ๐ผ๏ธ Default placeholder image before generation
- ๐ฑ Mobile-friendly
- Frontend: React
- API: Google Gemini API (
gemini-2.0-flash-preview-image-generation) - Environment: Node.js
- User enters a prompt in the input box.
- The app calls Gemini API and receives a base64 image.
- Image is rendered in the UI with a download button.
- Go to Google AI Studio
- Create a Google Cloud Project.
- Enable Generative Language API from the Cloud Console.
- Generate an API key.
- Add your key to a
.envfile:REACT_APP_GEMINI_API_KEY=your-key-here
โ The free tier includes 1500 requests/day.
- Voice Prompt Input (Speech-to-Text)
- Image Gallery for history
- Prompt History and Regenerate option
- Multiple image resolutions (256px, 512px, 1024px)
- Dark Mode Toggle ๐
