Quick Start Guide

Vibe Affirmations API

🆓 Try Demo Mode - No Auth Required

🚀 Get Started in 3 Steps

Step 0: Try Demo Endpoints (No Signup)

Test the API instantly without any authentication:

# Get a sample affirmation - any vibe!
curl "https://vibe-affirmations.p.rapidapi.com/demo/affirmation?vibe=cosmic"

# Browse all 9 vibes with examples
curl "https://vibe-affirmations.p.rapidapi.com/demo/vibes"
✅ Demo Mode Features:
  • No authentication required
  • 100 requests/day per IP address
  • Access to all 9 personality vibes
  • Real affirmations from curated collection
  • Perfect for evaluation and prototyping

Step 1: Subscribe on RapidAPI

Once you're ready for production, choose your plan:

  1. Visit Vibe Affirmations on RapidAPI
  2. Select your pricing tier (Free, Pro, or Premium)
  3. Click "Subscribe" - no credit card needed for free tier
  4. Copy your RapidAPI key from the dashboard

Step 2: Make Your First Authenticated Call

curl -X GET "https://vibe-affirmations.p.rapidapi.com/affirmation/daily?vibe=hype" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: vibe-affirmations.p.rapidapi.com"

Response:

{
  "vibe": "hype",
  "affirmation": "Let's go! You're crushing it!",
  "source": "cached-daily-drop"
}

Step 3: Integrate & Scale

Use the code examples below to integrate into your application.


📚 Code Examples

JavaScript / Node.js

const axios = require('axios');

async function getDailyAffirmation(vibe = 'hype') {
  try {
    const response = await axios.get(
      `https://vibe-affirmations.p.rapidapi.com/affirmation/daily?vibe=${vibe}`,
      {
        headers: {
          'X-RapidAPI-Key': process.env.RAPIDAPI_KEY,
          'X-RapidAPI-Host': 'vibe-affirmations.p.rapidapi.com'
        }
      }
    );
    
    console.log(response.data.affirmation);
    return response.data;
  } catch (error) {
    console.error('Error fetching affirmation:', error);
  }
}

// Usage
getDailyAffirmation('stoic');

Python

import requests
import os

def get_daily_affirmation(vibe='hype'):
    url = "https://vibe-affirmations.p.rapidapi.com/affirmation/daily"
    
    headers = {
        "X-RapidAPI-Key": os.getenv('RAPIDAPI_KEY'),
        "X-RapidAPI-Host": "vibe-affirmations.p.rapidapi.com"
    }
    
    params = {"vibe": vibe}
    
    response = requests.get(url, headers=headers, params=params)
    
    if response.status_code == 200:
        data = response.json()
        print(data['affirmation'])
        return data
    else:
        print(f"Error: {response.status_code}")
        return None

# Usage
get_daily_affirmation('zen')

React / Next.js

import { useState, useEffect } from 'react';

export default function AffirmationWidget({ vibe = 'hype' }) {
  const [affirmation, setAffirmation] = useState(null);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    async function fetchAffirmation() {
      try {
        const response = await fetch(
          `/api/affirmation?vibe=${vibe}`
        );
        const data = await response.json();
        setAffirmation(data.affirmation);
      } catch (error) {
        console.error('Error:', error);
      } finally {
        setLoading(false);
      }
    }

    fetchAffirmation();
  }, [vibe]);

  if (loading) return 
Loading...
; return (

{affirmation}

{vibe}
); }
💡 Pro Tip: For frontend applications, proxy API calls through your backend to keep your RapidAPI key secure. Never expose API keys in client-side code!

🎯 Available Endpoints

Endpoint Auth Required Description
GET /demo/affirmation ❌ No Try any vibe without authentication (100/day)
GET /demo/vibes ❌ No List all vibes with examples
GET /affirmation/daily ✅ Yes Cached affirmation (<10ms)
GET /affirmation/random ✅ Yes Random affirmation from vibe
GET /affirmation/bulk ✅ Yes Get 10 affirmations at once
POST /affirmation/live ✅ Yes + OpenAI Key Custom AI-generated affirmations
GET /vibes ✅ Yes List accessible vibes for your tier

🎨 The 9 Personality Vibes

BASIC

💪 Stoic

Marcus Aurelius wisdom for philosophical strength

"The obstacle is the way."

BASIC

🔥 Hype

High-energy motivation to get pumped

"Let's go! You're crushing it!"

BASIC

🔪 Roast

Tough love with playful sass

"At least you tried."

PRO

🧘 Zen

Mindfulness and inner peace

"Breathe in peace, breathe out tension."

PRO

😈 Savage

Unapologetic confidence and boss energy

"They doubted you. Prove them wrong."

PRO

📚 Scholar

Intellectual curiosity and wisdom

"Knowledge is the investment that pays the best interest."

PREMIUM

🌌 Cosmic

Universal perspective and existential awe

"You are stardust with consciousness."

PREMIUM

🛋️ Therapist

Compassionate validation and support

"Your feelings are valid."

PREMIUM

🎖️ Drill Sergeant

Military precision and discipline

"Drop and give me 20 reasons you'll succeed!"


🔑 API Key Management

⚠️ Security Best Practices:
  • Never commit API keys to Git - Use environment variables
  • Backend proxy recommended - Don't expose keys in frontend
  • Rotate keys regularly - Generate new keys every 90 days
  • Monitor usage - Set up alerts for unexpected spikes

Environment Variables

# .env file
RAPIDAPI_KEY=your_rapidapi_key_here
RAPIDAPI_HOST=vibe-affirmations.p.rapidapi.com

💡 Next Steps

  1. Explore 9 Vibes: View the complete vibes reference →
  2. Understand Security: Read security documentation →
  3. Review Terms: Check terms of service →
  4. Subscribe: Get your API key →