简体中文 | 繁體中文 | Русский язык | 한국어 | 日本語
-
This is an unofficial Suno API client based on Python and Streamlit currently supports functions such as generating music and obtaining music information. It comes with built-in maintenance and activation functions for tokens, so there is no need to worry about token expiration. You can set up multiple account information to be saved for use.
-
GitHub sometimes cannot be accessed. If it cannot be accessed, please move to Gitee address: https://gitee.com/SunoApi/SunoApi
- Set account information and automatically maintain and keep the program active
- Multiple account information can be set to be saved and used
- Music Sharing Square showcases all publicly available songs
- Enter the music feed ID to directly obtain song information
- Installation dependencies
pip3 install -r requirements.txt
- Start the project, please refer to the Streamlit documentation for details on Streamlit
streamlit run main.py
docker run -d \
--name sunoapi \
--restart always \
-p 8501:8501 \
sunoapi/sunoapi:latest
docker compose build && docker compose up
FROM python:3.10-slim-buster
WORKDIR /app
COPY requirements.txt ./
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements.txt --no-cache-dir
COPY . .
EXPOSE 8501
CMD [ "nohup", "streamlit", "run", "main.py" ]
docker-compose pull && docker-compose up -d
version: '3.1'
services:
sunoapi:
image: sunoapi/sunoapi:latest
container_name: sunoapi
ports:
- "8501:8501"
volumes:
- ./sunoapi.db:/app/sunoapi.db
restart: always
- First, Fork a copy of SunoApi code to your Github repository
- Select Github authorization login: https://share.streamlit.io/
- Open the deployment page: https://share.streamlit.io/deploy
- Repository selection: SunoApi/SunoApi
- Branch input: main
- Main file path input: main.py
- Click Deploy!
- First, retrieve your session and cookie from the browser page when logged in.
- After filling in the setting information, it will automatically keep alive. You can fill in multiple account information.
- Enter and save the information. You can modify the account information if you enter identity.
- Once the project is up and running, visit http://localhost:8501/ in your browser.
- If the page promp the message: Please save the information first, and then refresh the page to use it normally! Please first add your own account information and save it, then delete other invalid account information in the sunoapi.db database, including the account information I tested, and then you can use it normally.
- If the page promp the message: "Suno AI Music song generation failed to submit: Insufficient credits." Indicates that the credits of account information are insufficient, please add your account information to save, and then you can use it normally.
- After the music generation task is successfully submitted, the queue status of the generation task is pulled. When the status is "complete", it returns successfully. At this time, it defaults to waiting for the official generation file for 15 seconds. The official interface service directly returns the URL address of media files, and most of the time the page can display these media files normally. Occasionally, the interface may have returned the Url address of the media file, but the actual file cannot be accessed from the Url address and needs to wait for a while. At this point, the media file may not be able to be loaded on the page. You can right-click on the media player and copy the media file address. Open the address separately in the browser to access it, or right-click to save as download and save.
- Regarding the security issue of saving account session and cookie information, as long as your account is not recharged, there is no need to worry because you do not know your account password. The session and cookie information you fill in will become invalid if your account logs in to other activities or logs out of the official website, and the session and cookie information you fill in will change the next time you log in to the official website.
- Professional lyric assistance tools: https://poe.com/SuperSunoMaster
- Github Issues: https://github.com/SunoApi/SunoApi/issues
- My personal strength is always limited, any form of contribution is welcome, including but not limited to contributing code, optimizing documents, submitting issues and PR. Due to limited time, we do not accept to submit bugs to developers in wechat or wechat group, please submit issues and PR if you have problems or optimization suggestions!
- Suno AI official website: https://suno.com
- Suno-API: https://github.com/SunoAI-API/Suno-API
- SunoApi is an unofficial open source project for study and research only. Users voluntarily enter free account information to generate music. Each account generates five songs per day for free, and we don't use them for other purposes. Please feel free to use! If there are 10,000 users, the system can generate 50,000 songs per day for free. Please try to save your usage as you can only generate five songs per account per day for free. If everyone writes more than five songs a day, it's still not enough. The ultimate goal is to make it free to build whenever you need it.