Build an AI Hashtag Generator with AI Pass SDK
Want to add an AI-powered hashtag generator to your app or website? Here's how to build one using the AI Pass SDK — no API key management, no billing headaches. Your users pay directly, and you earn 50% commission on every API call.
What You'll Build
A hashtag generator that takes a topic and platform, then returns trending, relevant hashtags using AI. Works as a standalone tool or embedded in your existing site.
Prerequisites
- Create an AI Pass account at aipass.one
- Verify your email (required for payouts)
- Create an OAuth2 Client from Developer Dashboard → OAuth2 Clients
- Copy your Client ID — it looks like
client_XXXX(this is NOT your app slug!)
Step 1: Include the SDK
<script src="https://aipass.one/aipass-sdk.js"></script>
Step 2: Initialize
AiPass.initialize({
clientId: 'YOUR_CLIENT_ID', // from Developer Dashboard → OAuth2 Clients
requireLogin: true, // shows login modal automatically
darkMode: true // optional
});
The requireLogin: true flag handles all authentication automatically — login modal, token refresh, everything. No custom auth UI needed.
Step 3: Generate Hashtags
async function generateHashtags(topic, platform, count) {
const response = await AiPass.generateCompletion({
model: 'openai/gpt-4.1-mini',
messages: [
{
role: 'system',
content: `Generate ${count} trending hashtags for ${platform}. Return ONLY hashtags separated by spaces, each starting with #.`
},
{ role: 'user', content: topic }
]
});
const text = response.choices[0].message.content;
return text.match(/#[\w]+/g) || [];
}
Step 4: Display Results
Parse the hashtags and render them as clickable, copyable tags. Add a "Copy All" button for convenience.
Deploy Your App
Option A: Self-Host — Host the HTML file on your own server, GitHub Pages, Netlify, Vercel, or anywhere you want. The SDK handles all AI Pass authentication and billing. Your app, your domain, your rules.
Option B: Publish on AI Pass — Submit to the AI Pass catalog at aipass.one/apps. Get a dedicated page, discoverability, and use the embed feature (</> button) to iframe it into any website.
Revenue Model
- Users pay per API call (a few cents each)
- AI Pass handles billing, payments, and infrastructure
- You earn 50% commission on every call your users make
- Need a verified email for payouts
No API keys to manage. No billing to build. No infrastructure to maintain. Just build your tool, embed it, and earn.
Check out the live hashtag generator to see what you're building.
For full SDK docs, see the AI Pass SDK reference.