Skip to content

denniemok/headshotai-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 HeadshotAI 2

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


HTML5 CSS3 JavaScript Google Gemini


Original

LinkedIn LinkedIn Professional Casual Casual Passport

Original

LinkedIn LinkedIn Professional Casual Casual Passport

✨ Why HeadShotAI ?

🚀 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


🚀 Quick Start

Step 1: Get Your API Key 🔑

  1. Visit Google AI Studio
  2. Create a free account and generate an API key
  3. Copy your API key (you'll need it in the next step)

💡 Free Tier: No credit card required! Generous free usage limits.

Step 2: Open the Application 🌐

  1. Download or clone this repository
  2. Open index.html in any modern web browser
  3. No installation or build process required!

Step 3: Generate Your Headshot 🎨

  1. Paste your Gemini API key in the input field
  2. Drag & drop or click to select your image
  3. Adjust the crop area to frame your face perfectly
  4. Choose from professional styles and backgrounds
  5. Click the generate button

Even if you can't obtain an API key, you can still use this as a prompt generator.


💡 Pro Tips

Best Photos to Use

  • ✅ Clear, well-lit face photo
  • ✅ Front-facing (not profile)
  • ✅ Good resolution (at least 500x500px)
  • ✅ Minimal background clutter
  • ❌ Avoid sunglasses or hats
  • ❌ Avoid group photos

Getting the Best Results

  • 🎯 Center your face in the crop area
  • 🎯 Include some shoulder area
  • 🎯 Make sure eyes are clearly visible
  • 🎯 Use natural lighting in original photo

🛠️ File Structure

├── 📄 index.html          # Main application file
├── 🎨 styles.css          # All styles and animations
├── ⚙️ app.js              # Application logic and API integration
└── 📖 README.md           # This documentation

🔒 Privacy & Security

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

🐛 Troubleshooting

🔑 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

👨‍💻 Acknowledgements

This project is built upon and inspired by:



This project is released under the MIT License.

© 2025 HeadshotAI 2

About

Generate professional headshots from any photo, fast. Customize looks with 10+ presets for attire, hair, shot size, and background. Includes prompt generation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors