Image Generator | Prompt Generator
Generate professional headshots from any photo, fast.
Customize looks with 10+ presets for attire, hair, shot size,
and background. Includes prompt generation.
Perfect for LinkedIn, Social Media, Resume/CV, Portfolios,
Passport, Driver License, Email Signature, Company Website, etc.
🌐 Live Demo • 📥 Download • 📖 Documentation
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Professional | Casual | Casual | Passport |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Professional | Casual | Casual | Passport |
| 🚀 Instant Results | 🔒 Privacy First | 🎨 Easy Customisation |
|---|---|---|
| Just open and run | Runs locally | Various styles / presets |
| No complex setup | No data collection | Simple image cropper |
| Generate in seconds | Use trusted API | Customisable prompt |
- 🤖 AI-Powered - Google Gemini AI for professional results
- ✂️ Image Cropping - Built-in cropper for perfect headshots
- 🎨 Multiple Styles - Various attire, hair styles, shot sizes and backgrounds
- 🔧 Customisable Prompts - Advanced prompt editor for fine-tuning
- Visit Google AI Studio
- Create a free account and generate an API key
- Copy your API key (you'll need it in the next step)
💡 Free Tier: No credit card required! Generous free usage limits.
- Download or clone this repository
- Open
index.htmlin any modern web browser - No installation or build process required!
- Paste your Gemini API key in the input field
- Drag & drop or click to select your image
- Adjust the crop area to frame your face perfectly
- Choose from professional styles and backgrounds
- Click the generate button
Even if you can't obtain an API key, you can still use this as a prompt generator.
- ✅ Clear, well-lit face photo
- ✅ Front-facing (not profile)
- ✅ Good resolution (at least 500x500px)
- ✅ Minimal background clutter
- ❌ Avoid sunglasses or hats
- ❌ Avoid group photos
- 🎯 Center your face in the crop area
- 🎯 Include some shoulder area
- 🎯 Make sure eyes are clearly visible
- 🎯 Use natural lighting in original photo
├── 📄 index.html # Main application file
├── 🎨 styles.css # All styles and animations
├── ⚙️ app.js # Application logic and API integration
└── 📖 README.md # This documentation
| ✅ Local Processing | ✅ No Data Collection | ✅ Secure API |
|---|---|---|
| Runs entirely in your browser | No server or database | Direct to Google's secure API |
| No external dependencies | Your images stay private | API key stored locally only |
Important Notes:
- Your API key is stored in browser localStorage (local device only)
- Images are sent directly to Google's Gemini API for processing
- No data is collected or stored on any external servers
- Use HTTPS when hosting online for additional security
🔑 API Key Issues
Connection failed
- ✅ Ensure your key is correct and active
- ✅ Wait a moment and try again (free tier has rate limits)
- ✅ Ensure you have access to Gemini API
📸 Image Processing Issues
Failed to generate image
- ✅ Verify your API key is valid
- ✅ Try a different photo or format
- ✅ Wait a moment and try again (rate limiting)
Images taking too long
- ✅ Generation takes 1-2 minutes (this is normal)
- ✅ Free tier might be slower during peak times
- ✅ Be patient - AI processing takes time
💾 Cropper / Download Issues
Cropper not appearing
- ✅ Enable JavaScript in your browser
- ✅ Try refreshing the page
- ✅ Use a modern browser (Chrome, Firefox, Safari, Edge)
- ✅ Check browser console (F12) for errors
Download not working
- ✅ Check browser download settings
- ✅ Disable popup blockers
- ✅ Ensure JSZip library loads properly
This project is built upon and inspired by:
- 📚 HeadshotAI by Suraj Anand
This project is released under the MIT License.
© 2025 HeadshotAI 2















