Gunakan prompt berikut atau bisa Anda kembangkan lagi sesuai kebutuhan masing-masing untuk membuat generator gambar AI:
Atau berikut
Berikut struktur dasar yang akan dihasilkan Deepseek:
Tambahkan fitur berikut untuk pengalaman lebih baik:
Gagal memuat gambar. Coba prompt lain.
'; imgCard.style.padding = '15px'; imgCard.style.textAlign = 'center'; }; const downloadBtn = document.createElement('button'); downloadBtn.innerHTML = ' Download'; downloadBtn.onclick = () => downloadImage(imgUrl, prompt); imgCard.appendChild(img); imgCard.appendChild(downloadBtn); document.getElementById('result').appendChild(imgCard); } } catch (error) { console.error('Error:', error); showAlert('Gagal generate gambar', 'error'); } finally { document.getElementById('loading').style.display = 'none'; } }; // Fungsi download gambar const downloadImage = (url, filename) => { fetch(url) .then(response => { if (!response.ok) throw new Error('Network response was not ok'); return response.blob(); }) .then(blob => { const link = document.createElement('a'); link.href = URL.createObjectURL(blob); link.download = `ai-image-${filename.substring(0, 20)}-${Date.now()}.jpg`; document.body.appendChild(link); link.click(); document.body.removeChild(link); }) .catch(error => { console.error('Download error:', error); showAlert('Gagal mengunduh gambar', 'error'); }); }; // Fungsi tampilkan alert const showAlert = (message, type) => { const alertDiv = document.createElement('div'); alertDiv.className = `alert ${type}`; alertDiv.textContent = message; document.body.appendChild(alertDiv); setTimeout(() => { alertDiv.remove(); }, 3000); }; // Event listener untuk tombol generate document.getElementById('generateBtn').addEventListener('click', generateImage); // Event listener untuk tekan Enter di textarea document.getElementById('prompt').addEventListener('keypress', (e) => { if (e.key === 'Enter') { e.preventDefault(); generateImage(); } });Harga Domain Rp. 3000 1 April - 30 Juni 2025
Setelah domain aktif:
Metode 1: Via Web Interface
Metode 2: Via Git Command Line
Tambahkan fitur ini untuk pengalaman lebih baik: