AI
Pass

Build an AI Song Lyrics Writer App with AI Pass SDK

Build an AI Song Lyrics Writer App with AI Pass SDK

Music creators, bedroom producers, TikTok stars — they all need lyrics. Build an app that generates complete song lyrics for any genre in seconds. With AI Pass SDK, this is a single evening project.

What You'll Build

Users input:

  • Song topic/theme
  • Genre (pop, rap, country, R&B, rock, EDM, etc.)
  • Mood (upbeat, melancholic, fierce, romantic)
  • Optional: specific words or phrases to include

They get back: full lyrics with verse, chorus, bridge structure.

Step 1: Get Your Client ID

  1. Sign up at aipass.one
  2. Go to Developer DashboardOAuth2 Clients
  3. Create a new client → copy your YOUR_CLIENT_ID

Step 2: Build the App

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>AI Song Lyrics Writer</title>
  <script src="https://aipass.one/aipass-sdk.js"></script>
  <style>
    body { font-family: sans-serif; max-width: 700px; margin: 40px auto; padding: 20px; background: #0d0d1a; color: #fff; }
    h1 { color: #a29bfe; }
    select, input, textarea { width: 100%; margin: 8px 0 16px; padding: 10px; background: #1e1e2e; border: 1px solid #4a4a6a; border-radius: 6px; color: #fff; }
    button { background: #6c5ce7; color: white; padding: 12px 24px; border: none; border-radius: 6px; cursor: pointer; font-size: 16px; }
    #lyrics { background: #1e1e2e; padding: 24px; border-radius: 12px; margin-top: 20px; white-space: pre-wrap; line-height: 1.8; }
    label { color: #a0a0c0; font-size: 0.9em; }
  </style>
</head>
<body>
  <h1>🎵 AI Song Lyrics Writer</h1>
  
  <label>Song Topic or Theme</label>
  <input type="text" id="topic" placeholder="e.g. late night drive, falling in love, chasing dreams, heartbreak..." />
  
  <label>Genre</label>
  <select id="genre">
    <option value="pop">Pop 🎤</option>
    <option value="rap/hip-hop">Rap / Hip-Hop 🎧</option>
    <option value="country">Country 🤠</option>
    <option value="R&B soul">R&B / Soul ✨</option>
    <option value="rock">Rock 🎸</option>
    <option value="EDM/electronic">EDM / Electronic 🎛️</option>
    <option value="indie folk">Indie Folk 🌿</option>
    <option value="reggaeton">Reggaeton 🔥</option>
  </select>
  
  <label>Mood / Vibe</label>
  <select id="mood">
    <option value="upbeat and energetic">Upbeat & Energetic</option>
    <option value="melancholic and emotional">Melancholic & Emotional</option>
    <option value="fierce and empowering">Fierce & Empowering</option>
    <option value="romantic and dreamy">Romantic & Dreamy</option>
    <option value="dark and intense">Dark & Intense</option>
    <option value="chill and laid-back">Chill & Laid-Back</option>
    <option value="playful and fun">Playful & Fun</option>
  </select>
  
  <label>Any specific lines or words to include? (optional)</label>
  <input type="text" id="keywords" placeholder="e.g. must include: &quot;neon lights&quot;, rhyme with &quot;tonight&quot;..." />
  
  <button onclick="writeLyrics()">Write My Lyrics 🎶</button>
  <div id="lyrics"></div>

  <script>
    AiPass.initialize({
      clientId: 'YOUR_CLIENT_ID',
      requireLogin: true,
      darkMode: true
    });

    async function writeLyrics() {
      const topic = document.getElementById('topic').value;
      const genre = document.getElementById('genre').value;
      const mood = document.getElementById('mood').value;
      const keywords = document.getElementById('keywords').value;

      if (!topic) {
        alert('Please enter a song topic first');
        return;
      }

      document.getElementById('lyrics').textContent = 'Writing your lyrics... 🎵';

      const result = await AiPass.generateCompletion({
        model: 'gpt-5-mini',
        temperature: 1,
        max_tokens: 16000,
        messages: [
          {
            role: 'system',
            content: `You are a professional songwriter specializing in ${genre}. Write complete, authentic song lyrics with proper structure, rhyme scheme, and emotional depth. Make lyrics that feel genuine and singable.`
          },
          {
            role: 'user',
            content: `Write complete song lyrics for a ${genre} song about: "${topic}"
Mood: ${mood}
${keywords ? `Must include or rhyme with: ${keywords}` : ''}

Structure:
[Verse 1]
(4-8 lines)

[Pre-Chorus] (optional for pop/R&B)

[Chorus]  
(4-6 lines — the hook, most memorable part)

[Verse 2]
(4-8 lines — develops the story)

[Chorus]

[Bridge]
(4 lines — emotional peak or shift)

[Final Chorus]

Make it authentic to the ${genre} genre with appropriate language, flow, and imagery.`
          }
        ]
      });

      document.getElementById('lyrics').textContent = result.choices[0].message.content;
    }
  </script>
</body>
</html>

Deploy

Self-host: Single HTML file — no backend, no dependencies. Works on GitHub Pages, Netlify, anywhere.

AI Pass Catalog: Publish in your Developer Dashboard → earn 50% commission on every set of lyrics generated. Music creators use these apps a LOT.

Embed It

Click the </> button at the bottom-right of your published app to get an iframe embed code — perfect for music blogs, producer websites, or YouTube channels.

Try the live app: aipass.one/apps/lyrics-writer

Related apps: