This is an ai music website developed based on Next.js. It uses Suno AI to generate music.
We have deployed an example website on Vercel, so you can see how it runs: ai-song.vercel.app
-
obtain the cookie of your 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/Sprheany/ai-song.git
-
install dependencies
cd ai-song npm install
-
init database
create your database and run
npm run db:push
to create tables -
set env variables
put
.env
underai-song
root dir with values list belowSUNO_TOKEN= POSTGRES_PRISMA_URL= POSTGRES_URL_NON_POOLING= NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY= CLERK_SECRET_KEY= NEXT_PUBLIC_URL= LEMONSQUEEZY_API_KEY= LEMONSQUEEZY_STORE_ID= LEMONSQUEEZY_PRODUCT_ID= LEMONSQUEEZY_WEBHOOK_SECRET=
SUNO_COOKIE is the cookie value you obtained in the first step
-
run
npm run dev
Open http://localhost:3000 with your browser to see the result.