AI
Pass

How to Build an AI Text Humanizer & Earn Money with AI Pass

How to Build an AI Text Humanizer & Earn Money with AI Pass

Want to build an AI-powered app and actually make money from it? This tutorial walks you through building a text humanizer using the AI Pass SDK — step by step. Every API call your users make earns you commission.

What You'll Build

A web app that rewrites AI-generated text to sound human. Users paste text, pick tone + intensity, and get natural-sounding output. You earn a cut of every API call.

Live example: AI Text Humanizer on AI Pass

How You Make Money

AI Pass adds a small commission on each API call. As the app developer, you get 50% of that commission. More users = more calls = more revenue. No subscriptions to manage, no API keys to handle — AI Pass does all of that.

Step 1: Create an AI Pass Account

  1. Go to aipass.one and sign up
  2. Verify your email (required for payouts)
  3. You get $1 free credit to test with

Step 2: Create an OAuth2 Client

This is how AI Pass knows the API calls came from YOUR app.

  1. Go to Developer DashboardOAuth2 Clients
  2. Click "+ Register New Client"
  3. Fill in your app name (e.g., "My Text Humanizer")
  4. Set a redirect URI (e.g., https://yourdomain.com/callback or https://aipass.one/apps/your-slug if hosting on AI Pass)
  5. Save — you'll get a Client ID (looks like client_XXXX)

⚠️ The Client ID is NOT your app slug. It's a unique identifier from the OAuth2 Clients page. Copy it carefully.

Step 3: Set Up the SDK

Include the AI Pass SDK in your HTML and initialize it with your Client ID:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>AI Text Humanizer</title>
  <script src="https://aipass.one/aipass-sdk.js"></script>
</head>
<body>
  <!-- Your app UI here -->

  <script>
    // Initialize with YOUR Client ID from the Developer Dashboard
    AiPass.initialize({
      clientId: 'client_YOUR_CLIENT_ID',  // from OAuth2 Clients page
      requireLogin: true,                // shows login screen automatically
      darkMode: true                     // optional: dark theme for auth modal
    });
  </script>
</body>
</html>

requireLogin: true is important — it automatically shows a login/signup screen when users first visit. They create an AI Pass account (or log in), get $1 free credit, and start using your app. You don't need to build any auth UI yourself.

Step 4: Build the Humanizer Logic

The core is one function that calls AiPass.generateCompletion():

const TONES = {
  professional: 'Write in a clear, confident professional tone. Direct statements, measured authority.',
  casual: 'Write in a relaxed, conversational tone. Use contractions, shorter sentences, occasional humor.',
  academic: 'Write in a scholarly yet readable academic tone. Precise terminology, structured argumentation.',
  creative: 'Write with personality and flair. Vivid language, unexpected word choices, metaphors.'
};

const INTENSITY = {
  light: 'Make minimal changes. Fix obvious AI patterns. Keep 90%+ original wording.',
  balanced: 'Rewrite moderately. Restructure half the sentences, replace generic AI phrases.',
  aggressive: 'Deeply rewrite everything. The output should feel like a completely different writer.'
};

async function humanize(text, tone, intensity) {
  try {
    const r = await AiPass.generateCompletion({
      model: 'openai/gpt-4.1-mini',  // cheap & fast
      messages: [
        {
          role: 'system',
          content: `You are an expert editor who transforms AI-generated text into natural human writing. ${TONES[tone]} ${INTENSITY[intensity]} Only return the rewritten text. No explanations.`
        },
        { role: 'user', content: text }
      ]
    });
    return r.choices[0].message.content;
  } catch (err) {
    console.error('Humanize failed:', err);
    // SDK auto-handles budget exceeded (shows payment modal)
    throw err;
  }
}

Step 5: Add the UI

Build a simple form with:

  • Textarea for input text (max ~5,000 chars)
  • Tone selector — 4 buttons or dropdown (Professional, Casual, Academic, Creative)
  • Intensity selector — 3 levels (Light, Balanced, Aggressive)
  • "Humanize" button — calls humanize() and shows the result
  • Output area with a copy-to-clipboard button
  • Word count display (before/after)

The SDK handles everything else — login, payments, balance display.

Step 6: Embed or Deploy

Option A: Host on AI Pass — Submit your app to the AI Pass catalog. Your app gets its own page at aipass.one/apps/your-slug.

Option B: Embed on your own site — Every AI Pass app has an embed button (bottom-right </> icon). Click it to get an iframe code you can paste into any website, WordPress, Notion, etc. Your app, your domain, AI Pass handles the backend.

Available SDK Methods

Method Purpose Returns
generateCompletion({model, messages}) Text generation r.choices[0].message.content
generateImage({model, prompt, size}) Image generation r.data[0].url
editImage({model, prompt, image}) Image editing r.data[0].url
generateVideo({model, prompt}) Video generation videoId (then poll)
generateSpeech({model, input, voice}) Text to speech Audio blob
transcribeAudio({model, file}) Speech to text Transcription text
isAuthenticated() Check login state Boolean
getUserBalance() Get user credits Balance object

Available Models

Text (cheap & fast): openai/gpt-4.1-mini, google/gemini-2.5-flash-lite

Text (quality): anthropic/claude-sonnet-4-5, openai/gpt-4.1

Image Generation: flux-pro/v1.1, flux-pro/v1.1-ultra, imagen4/preview/ultra

Image Editing: gemini/gemini-3-pro-image-preview

SDK Documentation

Full SDK reference: aipass.one/aipass-sdk.js (source code, well-documented)

Summary

  1. Sign up at aipass.one
  2. Create an OAuth2 Client → get your Client ID
  3. Include the SDK → AiPass.initialize({ clientId: 'YOUR_CLIENT_ID', requireLogin: true })
  4. Build your UI + call AiPass.generateCompletion()
  5. Deploy or embed
  6. Earn commission on every API call your users make

Questions? Check the Developer Dashboard or explore the AI Pass blog for more tutorials.

Related

Skill File

---
name: aipass-text-humanizer
description: Build an AI Text Humanizer app on AI Pass. Users pay per use, you earn commission. No API key management needed.
version: 2.0.0
---

# Build an AI Text Humanizer on AI Pass

## Overview
Create a web app that rewrites AI-generated text to sound human. Users authenticate via AI Pass, pay per use. You earn commission on every API call.

## Prerequisites
1. AI Pass account — sign up at https://aipass.one
2. OAuth2 Client — create at Developer Dashboard → OAuth2 Clients → get your Client ID

## SDK Setup
```html
<script src="https://aipass.one/aipass-sdk.js"></script>
<script>
// Client ID from Developer Dashboard → OAuth2 Clients (NOT the app slug!)
AiPass.initialize({
  clientId: 'client_YOUR_CLIENT_ID',
  requireLogin: true,
  darkMode: true
});
</script>
```

## Core Logic
```javascript
async function humanize(text, tone, intensity) {
  const r = await AiPass.generateCompletion({
    model: 'openai/gpt-4.1-mini',
    messages: [
      { role: 'system', content: `You are an expert editor. Rewrite to sound human. ${TONES[tone]} ${INTENSITY[intensity]} Only return rewritten text.` },
      { role: 'user', content: text }
    ]
  });
  return r.choices[0].message.content;
}
```

## Key Points
- `requireLogin: true` shows auth screen automatically — no custom login UI needed
- SDK handles payments, balance, budget exceeded modals
- Client ID comes from OAuth2 Clients page (looks like `client_XXXX...`), NOT the app slug
- Response: `r.choices[0].message.content`
- Model: `openai/gpt-4.1-mini` (cheap) or `anthropic/claude-sonnet-4-5` (quality)
- Embed anywhere: use the </> button (bottom-right) to get iframe code for your website

## Live Example
https://aipass.one/apps/humanizer
Download Skill File