
How I built an AI headshot generator in 30 seconds (FLUX + Next.js + Stripe)
I had a weekend free and a simple question: how cheap and fast can I get a professional headshot delivered to someone? The answer I landed on: 30 seconds, PS4.99. Here is how I built it. The stack Next.js 14 (App Router) deployed on Netlify fal.ai for FLUX AI image generation Stripe for payments (one-time checkout, no subscriptions) Vercel Blob for temporary photo storage Total infrastructure cost per headshot generation: roughly PS0.04. How it works User uploads a photo (any clear face photo works) Photo stored temporarily in Vercel Blob, returns a URL User selects single (PS4.99) or 5-pack (PS14.99), redirected to Stripe Checkout On successful payment, photo URL + plan metadata come back via success URL fal.ai flux/dev model generates the headshot(s) User downloads instantly The whole flow is stateless - no database, no user accounts, no stored photos beyond the generation window. The hardest part: the prompt Getting FLUX to produce consistently professional-looking results took more
Continue reading on Dev.to
Opens in a new tab


