Powered by Puter.js · Category-aware prompt engine · 4 shot types · No API keys · 100% browser-side
Enter your product details — the smarter prompt engine handles the rest
// generateImages(productData) — the correct way in v5 const shots = await generateImages({ productName: 'Yellow Checkered Cotton Shirt', category: 'Clothing & Apparel', features: 'Slim fit, full sleeves, breathable cotton' }); // shots = [ // { url: '...', label: 'Studio Shot', type: 'studio', emoji: '📦', error: false }, // { url: '...', label: 'Model Shot', type: 'model', emoji: '👗', error: false }, // { url: '...', label: 'Lifestyle Shot', type: 'lifestyle', emoji: '🌿', error: false }, // { url: '...', label: 'Premium Brand Shot', type: 'premium', emoji: '✨', error: false }, // ]
// ── OLD (broken — only product name, no category/features) ── const imagePromise = window.generateProductImages(_state.productName.trim()); // ── NEW (fixed — pass full product data object) ── const imagePromise = window.generateImages({ productName: _state.productName.trim(), category: _state.category, // from ps-cat select features: _state.features, // from ps-feats input });
<!-- 1. Load Puter.js (optional — image-generator.js loads it automatically) --> <script src="https://js.puter.com/v2/"></script> <!-- 2. Load the fixed image generator --> <script src="image-generator.js"></script> <!-- 3. Call it --> <script> const shots = await generateImages({ productName: 'Silk Banarasi Saree', category: 'Saree', features: 'Zari border, red and gold, wedding wear', }); shots.forEach(s => console.log(s.label, s.url)); </script>