AI
Pass

Build an AI Product Description Generator - Complete Tutorial

Build an AI Product Description Generator - Complete Tutorial

Learn how to build a powerful AI-powered product description generator using the AI Pass platform. This step-by-step guide covers everything from setup to deployment.

Prerequisites

Step 1: Sign Up and Get Your Client ID

  1. Go to AI Pass Developer Dashboard
  2. Sign up for an account ($1 free credit on signup)
  3. Navigate to OAuth2 Clients section
  4. Click Create New Client
  5. Name your app (e.g., "Product Desc Generator")
  6. Copy your Client ID - you'll need this for the SDK

Step 2: Initialize the SDK

Include the AI Pass SDK in your HTML:

<script src="https://aipass.one/aipass-sdk.js"></script>

Initialize with OAuth2 and requireLogin:

const aipass = new AIPassSDK({
  clientId: 'YOUR_CLIENT_ID',
  requireLogin: true,
  onSuccess: (token) => {
    console.log('User authenticated:', token);
  }
});

Step 3: Create the Product Description Generator

Here's the complete implementation:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>AI Product Description Generator</title>
  <script src="https://aipass.one/aipass-sdk.js"></script>
  <style>
    body { font-family: Arial, sans-serif; max-width: 800px; margin: 50px auto; padding: 20px; }
    .form-group { margin-bottom: 20px; }
    label { display: block; margin-bottom: 5px; font-weight: bold; }
    input, textarea, select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; }
    button { background: #4CAF50; color: white; padding: 12px 24px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
    button:hover { background: #45a049; }
    #output { margin-top: 20px; padding: 20px; background: #f5f5f5; border-radius: 5px; white-space: pre-wrap; }
  </style>
</head>
<body>
  <h1>AI Product Description Generator</h1>
  
  <div class="form-group">
    <label>Product Name:</label>
    <input type="text" id="productName" placeholder="e.g., Wireless Bluetooth Earbuds">
  </div>
  
  <div class="form-group">
    <label>Key Features:</label>
    <textarea id="features" rows="3" placeholder="e.g., Active noise cancellation, 20-hour battery, IPX5 waterproof"></textarea>
  </div>
  
  <div class="form-group">
    <label>Target Audience:</label>
    <input type="text" id="audience" placeholder="e.g., Fitness enthusiasts, commuters">
  </div>
  
  <div class="form-group">
    <label>Tone:</label>
    <select id="tone">
      <option value="professional">Professional</option>
      <option value="friendly">Friendly and Casual</option>
      <option value="luxury">Luxury and Premium</option>
      <option value="playful">Playful and Fun</option>
    </select>
  </div>
  
  <button onclick="generateDescription()">Generate Description</button>
  
  <div id="output"></div>

  <script>
    const aipass = new AIPassSDK({
      clientId: 'YOUR_CLIENT_ID',
      requireLogin: true,
      onSuccess: (token) => {
        console.log('Ready to generate descriptions!');
      }
    });

    async function generateDescription() {
      const productName = document.getElementById('productName').value;
      const features = document.getElementById('features').value;
      const audience = document.getElementById('audience').value;
      const tone = document.getElementById('tone').value;
      
      if (!productName || !features) {
        alert('Please fill in product name and features');
        return;
      }

      const prompt = `Write a compelling product description for the following product:

Product: ${productName}
Features: ${features}
Target Audience: ${audience}
Tone: ${tone}

Make it engaging, benefit-focused, and marketing-ready. Include a catchy headline.`;

      try {
        const result = await aipass.generateText({
          model: 'gpt-5-mini',
          prompt: prompt,
          temperature: 1,
          max_tokens: 16000
        });

        document.getElementById('output').textContent = result.text;
      } catch (error) {
        console.error('Error:', error);
        document.getElementById('output').textContent = 'Error: ' + error.message;
      }
    }
  </script>
</body>
</html>

Step 4: Deploy Your App

You have two deployment options:

Option A: Self-Host Anywhere

  • Vercel: Drag and drop your HTML file
  • Netlify: Connect your GitHub repo
  • Any web server: Upload to nginx, Apache, or any hosting
  • Local testing: Just open the HTML file in a browser

Option B: Publish on AI Pass Catalog

  1. Go to AI Pass Apps Dashboard
  2. Click Create New App
  3. Fill in app details:
    • Name: "AI Product Description Generator"
    • Description: "Generate compelling product descriptions with AI"
    • Category: Ecommerce
    • Content: Paste your HTML code
  4. Click Publish
  5. Your app is now live on the AI Pass catalog!

Earn 50% commission on every transaction when users interact with your published app.

Key Features Explained

temperature:1

  • Maximum creativity and variation
  • Perfect for unique, engaging product descriptions
  • Generates fresh content every time

max_tokens:16000

  • Generous length for detailed descriptions
  • Allows for comprehensive product stories
  • No need to truncate output

requireLogin:true

  • Ensures authenticated users only
  • Tracks usage per user
  • Enables personalized experiences

Next Steps

  • Customize the UI to match your brand
  • Add product image upload integration
  • Implement multi-language support
  • Create description templates for different product categories

Get Started Today

Sign up now and get $1 free credit to start building your AI product description generator!

Need help? Check out the SDK documentation and developer guides.