All posts
tutorial

Build an AI Paraphraser with AI Pass SDK

Build a multi-mode paraphraser with AI Pass SDK. Tutorial with code for 7 rewriting modes.

EiliyaFebruary 15, 20261 min read

Build an AI Paraphraser with AI Pass SDK

Add text rewriting to your app with the AI Pass SDK. Multiple modes, instant results.

Setup

  1. AI Pass account → Developer Dashboard → OAuth2 Clients
  2. Create client, copy Client ID

Initialize

<script src="https://aipass.one/aipass-sdk.js"></script>
<script>
AiPass.initialize({
  clientId: 'YOUR_CLIENT_ID',
  appSlug: 'your-paraphraser',
  requireLogin: true,
  darkMode: true
});
</script>

Paraphrase Text

const mode = 'formal'; // standard|fluency|formal|academic|creative|shorten|expand
const instructions = {
  standard: 'Rewrite clearly while preserving meaning.',
  fluency: 'Improve flow and readability.',
  formal: 'Rewrite in formal, professional tone.',
  academic: 'Rewrite in academic style.',
  creative: 'Rewrite creatively with vivid language.',
  shorten: 'Make significantly shorter, keep key meaning.',
  expand: 'Expand with more detail.'
};

const response = await AiPass.generateCompletion({
  model: 'gpt-5-mini',
  messages: [
    { role: 'system', content: instructions[mode] + ' Only return rewritten text.' },
    { role: 'user', content: originalText }
  ]
});
const rewritten = response.choices[0].message.content;

Boot Script

<script>
setTimeout(function(){
  var b = document.createElement("div");
  b.setAttribute("data-aipass-button", "");
  document.body.appendChild(b);
  if (window.AiPassUI) AiPassUI.reinit();
}, 200);
</script>

Commission

Earn 50% of all API usage through your app. No minimums, no caps.

Live: AI Paraphraser | SDK: aipass.one/aipass-sdk.js

Related apps