AI Image Prompts for Product Photos: Templates That Work
A good AI prompt for a product photo describes five things in plain sentences: the product, the setting, the lighting, the camera angle and the style.
Notes
Security notes, SOC lab write-ups and tested code by Mahir Faysal, a SOC Level 1 cybersecurity learner in Bangladesh, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.
A good AI prompt for a product photo describes five things in plain sentences: the product, the setting, the lighting, the camera angle and the style.
Describe the JSON once in Zod, send z.toJSONSchema() to Gemini as responseJsonSchema, then validate the reply with safeParse and retry once with the errors.
Step by step: a Gemini key from Google AI Studio in .env.local, a server-only helper, a Next.js route handler, Vercel environment variables and a leak test.
How I built Quizwright so the Gemini API key never reaches the browser: one Next.js server route, a server-only import, Zod checks and a single retry.
0%