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.
- 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.
- clone project
git clone https://github.com/Alvin-Liu/suno-music-generator.git
- install dependencies
cd suno-music-generator
pnpm install
- init database
create your database use local postgres or vercel-postgres
create tables from sql at data/install.sql
- 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
- local development
pnpm dev
open http://localhost:3000
for preview
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.