/suno-music-generator

基于 suno.ai 实现的文字快速创作音乐网站 (A text-based rapid music creation website based on suno.ai )

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Suno Music Generator

Suno Music Generator

English | 简体中文

This is an unofficial music generation website developed based on NextJS for suno.ai. It can generate the desired song within approximately one minute based on the prompt entered by the user.

The project utilizes JavaScript reverse engineering to analyze the API used by suno.ai to generate songs. Payments are processed through Lemon Squeezy. Additionally, the project incorporates token renewal and maintenance functionality to eliminate the need for concerns about token expiration.

Live Demo

https://sunomusic.fun

One-click Deployment

Deploy with Vercel

Quick Start

  1. obtain the cookie of your app.suno.ai account

Locate the request that contains the keyword "client?_clerk_js_version". Navigate to the Cookie section, hover your mouse over it, and copy the value of the Cookie.

  1. clone project
git clone https://github.com/Alvin-Liu/suno-music-generator.git
  1. install dependencies
cd suno-music-generator
pnpm install
  1. init database

create your database use local postgres or vercel-postgres

create tables from sql at data/install.sql

  1. set environmental values

put .env.local under suno-music-generator root dir with values list below

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=""
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/

SUNO_COOKIE=""

LEMON_SQUEEZY_HOST=https://api.lemonsqueezy.com/v1
LEMON_SQUEEZY_API_KEY=
LEMON_SQUEEZY_STORE_ID=
LEMON_SQUEEZY_PRODUCT_ID=
LEMON_SQUEEZY_MEMBERSHIP_MONTHLY_VARIANT_ID=
LEMON_SQUEEZY_MEMBERSHIP_SINGLE_TIME_VARIANT_ID=
LEMONS_SQUEEZY_SIGNATURE_SECRET=

POSTGRES_URL=

SUNO_COOKIE is the cookie value you obtained in the first step

  1. local development
pnpm dev

open http://localhost:3000 for preview

Credit to

Other Things

You can contact me via the following Twitter link: https://twitter.com/Alvin_Liu_9527. As a newcomer, I sincerely ask for your attention and follow.

If this project is helpful to you, please consider buying me a coffee.

Buy Me A Coffee