Build an AI Photo Enhancer with AI Pass SDK
Build an AI Photo Enhancer with AI Pass SDK
Want to add photo enhancement to your website? With AI Pass SDK, you can process images with a few lines of JavaScript — no backend needed.
Your users pay for their own usage, and you earn 50% commission on every API call.
What You'll Build
A photo enhancement tool where users upload photos and get improved versions — sharper, brighter, better colors. Users sign in, use the tool, pay as they go. You earn commission.
Prerequisites
- Create an AI Pass account at aipass.one
- Verify your email (required for commission payouts)
- Create an OAuth2 Client from Developer Dashboard → OAuth2 Clients
- Copy your Client ID — looks like
client_XXXX(NOT your app slug!)
Core Code
<script src="https://aipass.one/aipass-sdk.js"></script>
<script>
AiPass.initialize({
clientId: 'YOUR_CLIENT_ID', // from Developer Dashboard → OAuth2 Clients
requireLogin: true,
darkMode: true
});
async function enhancePhoto(prompt, imageFile) {
const reader = new FileReader();
reader.readAsDataURL(imageFile);
return new Promise((resolve) => {
reader.onload = async () => {
const base64 = reader.result;
const r = await AiPass.editImage({
model: 'gemini/gemini-3-pro-image-preview',
prompt: prompt,
image: base64
});
resolve(r.data[0].url);
};
});
}
</script>
Key Points
clientIdcomes from Developer Dashboard → OAuth2 Clients (NOT the app slug)requireLogin: trueshows the auth screen automatically — no custom login UI needededitImage()returnsr.data[0].url- Users get $1 free credit on signup, then pay as they go
Deploy Your App
Option A: Self-Host — Host anywhere: your server, GitHub Pages, Netlify, Vercel. The SDK handles auth and billing.
Option B: Publish on AI Pass — Get a shareable page with a built-in </> embed button for iframe embedding.
Revenue Model
- You get 50% of the commission on every API call — tracked via your OAuth2 Client ID
- Valid verified email required for payouts
Try the Live App
See this in action: AI Photo Enhancer
Related: Photo Enhancer Guide | Photo Enhancer API Skill