Created a mood-based playlist generator using Gemini and the Spotify API — remarkably effective at interpreting abstract emotions

Developing an Intuitive Mood-to-Playlist Generator Using Gemini and Spotify API

In the evolving landscape of music discovery and personalization, creating tools that seamlessly interpret human emotions remains a compelling challenge. Recently, I developed a web application that transforms natural language descriptions of mood into tailored Spotify playlists, offering a novel way for users to find music that resonates with their current feelings.

Project Overview

The core functionality of the app allows users to input any descriptive phrase—ranging from “gym motivation” to “nostalgic but not depressing”—and receive a curated playlist that matches the sentiment. The goal was to create an intuitive experience that understands abstract emotional states beyond simple keywords.

Technical Architecture

To bring this concept to life, I employed a modern tech stack focused on performance, flexibility, and aesthetic appeal:

  • Next.js 14: Facilitates server-side rendering and rapid deployment.
  • Gemini API: Serves a dual purpose—interpreting the user’s mood description and curating relevant songs based on the inferred emotion.
  • Spotify Web API: Used to create and populate playlists directly within the user’s Spotify account.
  • Tailwind CSS & Custom CSS Variables: Ensures a sleek, responsive interface with customizable theming options.
  • Vercel: Handles deployment, offering a seamless hosting experience with automatic scaling.

Key Highlights

One of the most surprising outcomes was Gemini’s remarkable ability to comprehend and process abstract emotional descriptions. Whether users expressed a desire for a “motivational gym playlist” or a “nostalgic but uplifting” vibe, the system effectively interpreted these nuanced feelings to generate fitting playlists.

Experience and Future Directions

This project showcases how combining advanced APIs with modern web frameworks can create personalized, emotion-aware music experiences. Moving forward, I aim to improve the system’s contextual understanding and expand its playlist curation capabilities.

Explore the App

Interested in trying it out? Visit the live version at https://beats-on-feels.vercel.app/ and discover how your mood can shape your musical journey.


By harnessing innovative API integrations and contemporary development tools, this project exemplifies the potential of technology to enrich personal music discovery through emotional understanding.


Leave a Reply

Your email address will not be published. Required fields are marked *