AI
Pass

Build an AI Photo Editor App - Complete SDK Tutorial

Build an AI Photo Editor App - Complete SDK Tutorial

Create an AI photo editor where users describe edits and watch AI transform images. Earn 50% commission on every API call.

What You'll Build

A web app that:

  • Lets users upload photos
  • Accepts text descriptions of edits
  • Applies AI-powered image edits
  • Downloads the edited image

Prerequisites

  • Basic HTML/JavaScript
  • AI Pass account

Step 1: Get Client ID

  1. Go to Developer Dashboard
  2. OAuth2 Clients → Create New
  3. Copy your Client ID

Step 2: Initialize SDK

<script src="https://aipass.one/aipass-sdk.js"></script>
<script>
  const sdk = new AIPassSDK({
    clientId: 'YOUR_CLIENT_ID',
    requireLogin: true
  });
</script>

Step 3: Edit Image

async function editImage(imageUrl, editPrompt) {
  const r = await sdk.editImage({
    model: 'gemini/gemini-3-pro-image-preview',
    imageUrl: imageUrl,
    prompt: editPrompt
  });
  
  return r.data[0].url;
}

Step 4: Build UI

<input type="file" id="photo-upload">
<input type="text" id="edit-prompt" placeholder="Describe your edit...">
<button onclick="editPhoto()">Edit Photo</button>
<img id="result">

Deploy & Earn

Deploy anywhere and earn 50% commission.

Get Your Client ID →