Thank you to Suno API for the unnoficial API making this project possible!
-
Clone repository
-
Edit the .env file to fill in your OpenAI API Key, Session_ID and Cookies
-
Session ID:
a. Navigate to Suno AI, log in, and right click --> inspect
b. Click Network, and find
tokens?_clerk_js_version=4.72.0-snapshot.vc141245
c. Click and copy the session ID from the URL in the Headers:
-
Cookie:
a. Scroll down and find "Cookie" and copy that value:
-
Open AI:
a. Navigate to https://platform.openai.com/account/api-keys and grab your API key
-
-
Paste these values into your .env file
-
Install dependencies
Run
pip3 install -r requirements.txt
-
Open command prompt / terminal and navigate to the repository directory and enter:
uvicorn main:app
-
Open another command line window and run the program
manualprompt.py
allows you to manually enter in your prompt, and pull the songs that are generated from Suno AI and download them to your local directory. Timeout is set to 120 seconds, feel free to change it but you have to wait for the song to generate before it can be downloaded
dictateprompt.py
allows you to dictate your prompt with your voice, transcribe that prompt and send the transcription to Suno AI to generate a song and save it to your local directory.