Build an AI Logo Generator App - Complete SDK Tutorial
Build an AI Logo Generator App - Complete SDK Tutorial
Learn how to build your own AI logo generator using the AI Pass SDK. This tutorial covers everything from OAuth2 setup to generating professional logos for any brand.
What You'll Build
An AI-powered logo generator that can:
- Generate custom logos from brand names
- Create logos in different styles (minimalist, modern, vintage, playful, etc.)
- Generate logos with specific color schemes
- Create multiple variations of the same concept
- Support different industries and use cases
Prerequisites
- Basic JavaScript/HTML knowledge
- A web server or hosting platform
- AI Pass account (free signup)
Step 1: Sign Up for AI Pass
- Go to AI Pass and create a free account
- Verify your email address
- You'll get $1 free credit on signup - enough to test the full functionality
Step 2: Get Your Client ID from Developer Dashboard
- Navigate to the Developer Dashboard at
/panel/developer.html - Click on OAuth2 Clients in the sidebar
- Click "Create New Client" and name it (e.g., "My Logo Generator")
- Copy your Client ID - it looks like
client_ODyf...
Important: The Client ID comes from the OAuth2 Clients page, NOT from your app slug.
Step 3: Initialize the SDK
Add the AI Pass SDK to your HTML:
<script src="https://aipass.one/aipass-sdk.js"></script>
Initialize with your Client ID:
const aipass = new AIPass({
clientId: 'YOUR_CLIENT_ID', // Replace with your OAuth2 Client ID
requireLogin: true // Shows login screen automatically
});
Why requireLogin: true? This eliminates the need to build your own authentication UI. When users interact with your app, they'll see a secure AI Pass login screen, get their $1 free credit, and start using your app immediately.
Step 4: Generate a Logo
Here's how to generate a logo based on user input:
async function generateLogo(brandName, style, colors, industry) {
const prompt = `Create a professional logo design for a brand called "${brandName}". Style: ${style}. Colors: ${colors || 'modern and professional color palette'}. Industry: ${industry || 'general business'}. The logo should be simple, memorable, and versatile. Focus on the brand name and icon/symbol that represents the brand's identity.`;
const response = await aipass.generateImage({
model: 'flux-pro/v1.1',
prompt: prompt,
n: 1,
size: '1024x1024'
});
const logoUrl = response.data[0].url;
return logoUrl;
}
// Example usage
generateLogo('TechFlow', 'minimalist modern', 'blue and white', 'technology')
.then(url => console.log('Logo generated:', url))
.catch(err => console.error('Error:', err));
Step 5: Generate Multiple Variations
Create several logo options for the user to choose from:
async function generateLogoVariations(brandName, style, colors, industry, count = 4) {
const logos = [];
for (let i = 0; i < count; i++) {
const prompt = `Design option ${i + 1}: Create a professional logo for "${brandName}". Style: ${style}. Colors: ${colors || 'modern palette'}. Industry: ${industry || 'business'}. Make this design unique from other options. Focus on creating a distinctive visual identity.`;
const response = await aipass.generateImage({
model: 'flux-pro/v1.1',
prompt: prompt,
n: 1,
size: '1024x1024'
});
logos.push({
option: i + 1,
url: response.data[0].url
});
}
return logos;
}
Step 6: Get Color Suggestions
Use GPT-5 to suggest color palettes based on the brand:
async function getColorPalette(brandName, industry) {
const prompt = `Suggest a professional color palette for a brand called "${brandName}" in the ${industry || 'general business'} industry. Provide 3 complementary colors in hex format. Briefly explain why these colors work well for this brand. Format as: Color Name: #HEX - reason.`;
const response = await aipass.generateCompletion({
model: 'openai/gpt-4.1-mini',
messages: [
{ role: 'system', content: 'You are a professional brand designer and color theorist.' },
{ role: 'user', content: prompt }
],
temperature: 0.8,
max_tokens: 8000
});
return response.choices[0].message.content;
}
Step 7: Build the UI
Here's a complete UI for your logo generator:
<!DOCTYPE html>
<html>
<head>
<title>AI Logo Generator</title>
<script src="https://aipass.one/aipass-sdk.js"></script>
<style>
body { font-family: Arial, sans-serif; max-width: 1000px; margin: 50px auto; padding: 20px; }
.input-section { background: #f5f5f5; padding: 30px; border-radius: 10px; margin-bottom: 30px; }
label { display: block; margin: 10px 0 5px; font-weight: bold; }
input, select, textarea { width: 100%; padding: 12px; margin: 5px 0 20px; border: 1px solid #ddd; border-radius: 5px; box-sizing: border-box; }
button { background: #6366f1; color: white; padding: 15px 30px; border: none; cursor: pointer; font-size: 18px; border-radius: 5px; width: 100%; }
button:hover { background: #4f46e5; }
button:disabled { background: #ccc; cursor: not-allowed; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 30px; }
.logo-card { border: 1px solid #ddd; border-radius: 10px; overflow: hidden; }
.logo-card img { width: 100%; height: auto; }
.logo-info { padding: 15px; text-align: center; }
.loading { text-align: center; padding: 40px; }
.spinner { border: 4px solid #f3f3f3; border-top: 4px solid #6366f1; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
</style>
</head>
<body>
<h1>🎨 AI Logo Generator</h1>
<p>Create professional logos for your brand in seconds using AI.</p>
<div class="input-section">
<label>Brand Name</label>
<input type="text" id="brandName" placeholder="e.g., TechFlow, GreenLeaf, UrbanSparks">
<label>Style</label>
<select id="style">
<option value="minimalist modern">Minimalist Modern</option>
<option value="bold and dynamic">Bold and Dynamic</option>
<option value="elegant and sophisticated">Elegant and Sophisticated</option>
<option value="playful and friendly">Playful and Friendly</option>
<option value="vintage classic">Vintage Classic</option>
<option value="futuristic tech">Futuristic Tech</option>
</select>
<label>Industry</label>
<select id="industry">
<option value="">Select industry (optional)</option>
<option value="technology">Technology</option>
<option value="healthcare">Healthcare</option>
<option value="food and beverage">Food & Beverage</option>
<option value="fashion">Fashion</option>
<option value="finance">Finance</option>
<option value="education">Education</option>
<option value="entertainment">Entertainment</option>
<option value="retail">Retail</option>
</select>
<label>Colors (optional, comma-separated)</label>
<input type="text" id="colors" placeholder="e.g., blue, white, gray">
<label>Number of Variations</label>
<select id="count">
<option value="2">2 designs</option>
<option value="4" selected>4 designs</option>
<option value="6">6 designs</option>
<option value="8">8 designs</option>
</select>
<button onclick="generateLogos()" id="generateBtn">Generate Logos ✨</button>
</div>
<div id="output"></div>
<script>
const aipass = new AIPass({
clientId: 'YOUR_CLIENT_ID',
requireLogin: true
});
async function generateLogos() {
const brandName = document.getElementById('brandName').value;
const style = document.getElementById('style').value;
const industry = document.getElementById('industry').value;
const colors = document.getElementById('colors').value;
const count = parseInt(document.getElementById('count').value);
const output = document.getElementById('output');
const btn = document.getElementById('generateBtn');
if (!brandName) {
alert('Please enter a brand name!');
return;
}
btn.disabled = true;
btn.textContent = 'Generating...';
output.innerHTML = '<div class="loading"><div class="spinner"></div><p>Creating your logos...</p></div>';
try {
const logos = [];
for (let i = 0; i < count; i++) {
const prompt = `Design option ${i + 1}: Create a professional, memorable logo for a brand called "${brandName}". Style: ${style}. ${industry ? `Industry: ${industry}.` : ''} ${colors ? `Use these colors: ${colors}.` : 'Use a professional color palette.'} The logo should be simple, versatile, and distinctive. Focus on creating a strong visual identity that works well at any size. Avoid clutter and keep the design clean and impactful.`;
const response = await aipass.generateImage({
model: 'flux-pro/v1.1',
prompt: prompt,
n: 1,
size: '1024x1024'
});
logos.push({
option: i + 1,
url: response.data[0].url
});
// Update progress
output.innerHTML = `<div class="loading"><div class="spinner"></div><p>Generating logo ${i + 1} of ${count}...</p></div>`;
}
// Display results
let html = '<div class="logo-grid">';
logos.forEach(logo => {
html += `
<div class="logo-card">
<img src="${logo.url}" alt="Logo Option ${logo.option}">
<div class="logo-info">
<strong>Option ${logo.option}</strong>
<p><a href="${logo.url}" target="_blank" download>Download</a></p>
</div>
</div>
`;
});
html += '</div>';
html += '<p style="margin-top: 30px; text-align: center;">Like a design? Click Download to save it to your device.</p>';
output.innerHTML = html;
} catch (error) {
output.innerHTML = `<p style="color: red; text-align: center;">Error: ${error.message}</p>`;
} finally {
btn.disabled = false;
btn.textContent = 'Generate More Logos ✨';
}
}
</script>
</body>
</html>
Step 8: Embed Your App
After testing on AI Pass, use the </> button at the bottom-right of your app to get the iframe code. Embed it anywhere - your portfolio, client websites, or design agency site.
Monetize Your App
Earn 50% commission on every API call made through your app. When users generate logos, you earn passive income. AI Pass handles all payments and billing.
Next Steps
- Replace
YOUR_CLIENT_IDwith your actual Client ID - Test your app on AI Pass
- Add features like logo editing, color variations, and different formats
- Share your app and start earning 50% commission
Need Help?
- Developer Dashboard:
/panel/developer.html - SDK Documentation: https://aipass.one/aipass-sdk.js
- Live Example: Try the Logo Generator
Start building your AI logo generator today and tap into the massive design and branding market!