Skip to content

Transform any photo into a professional headshot in seconds with AI-powered enhancement. Perfect for LinkedIn profiles, resumes, and professional portfolios.

Notifications You must be signed in to change notification settings

anandsuraj/ai-professional-headshot-generator

Repository files navigation

🎯 HeadshotAI - Professional Headshot Generator

Transform any photo into a professional headshot in seconds with AI-powered enhancement. Perfect for LinkedIn profiles, resumes, and professional portfolios.

🚀 Live Demo

Try HeadshotAI Now →

✨ Features

  • 🤖 AI-Powered Enhancement - Advanced AI technology for professional results
  • 🗑️ Background Remover - Automatically removes and replaces backgrounds
  • 👁️ Smart Blur - Professional depth-of-field effects
  • 💖 Quality Enhancer - Improves image resolution and clarity
  • Beautification - Subtle retouching for a polished look
  • 🎨 9 Unique Styles - Multiple professional suit styles and colors
  • Instant Results - Generate headshots in seconds
  • 📱 Responsive Design - Works perfectly on all devices

🛠️ Tech Stack

  • Frontend: React 19, TypeScript, Tailwind CSS
  • AI Model: Gemini API, using Gemini 2.5 Flash Image Preview (aka Nano Banana) (gemini-2.5-flash-image-preview)
  • Image Processing: React Image Crop
  • File Handling: JSZip for batch downloads
  • Deployment: Vercel

🏃‍♂️ Run Locally

Prerequisites: Node.js 18+

  1. Clone the repository:

    git clone https://github.com/your-username/ai-professional-headshot-generator.git
    cd ai-professional-headshot-generator
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    cp .env.example .env

    Add your Gemini API key to .env:

    GEMINI_API_KEY=your_gemini_api_key_here
    
  4. Run the development server:

    npm run dev
  5. Open your browser: Navigate to http://localhost:5173

🚀 Deploy to Vercel

  1. Push to GitHub:

    git add .
    git commit -m "Initial commit"
    git push origin main
  2. Deploy on Vercel:

    • Connect your GitHub repository to Vercel
    • Add GEMINI_API_KEY environment variable in Vercel dashboard
    • Deploy automatically

📖 How It Works

  1. Upload Photo - Drag & drop or select your image (PNG, JPG, WEBP)
  2. Crop & Adjust - Use the built-in cropper for perfect framing
  3. AI Processing - Powered by Gemini API's gemini-2.5-flash-image-preview model (aka Nano Bana
  4. Generate - AI creates 9 professional headshot variations with different suit styles
  5. Download - Save individual images or download all as ZIP

🎨 Generated Styles

The AI generates headshots in various professional styles:

  • Classic Styles: Navy blue, black, light gray suits
  • Modern Styles: Charcoal gray, brown, dark green suits
  • Minimalist Styles: Burgundy, beige, deep charcoal suits

🔧 Configuration

Environment Variables

  • GEMINI_API_KEY - Your Google Gemini API key (required)

Supported Image Formats

  • PNG (recommended)
  • JPEG/JPG
  • WEBP

📄 License

This project is licensed under the MIT License.

👨‍💻 Created By

Suraj Anand
LinkedIn | GitHub


© 2025 HeadshotAI Professional Generator. Made with ♥ for professional success.

About

Transform any photo into a professional headshot in seconds with AI-powered enhancement. Perfect for LinkedIn profiles, resumes, and professional portfolios.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published