Use API to call the music generation AI of Suno.ai and easily integrate it into agents like GPTs.
👉 We update quickly, please star.
English | 简体中文 | Demo | Docs | Deploy with Vercel
> 🔥 Check out our new open-source project: [Album AI - Chat with your gallery using plain language!](https://github.com/gcui-art/album-ai)  ## Introduction Suno.ai v3 is an amazing AI music service. Although the official API is not yet available, we couldn't wait to integrate its capabilities somewhere. We discovered that some users have similar needs, so we decided to open-source this project, hoping you'll like it. ## Demo We have deployed an example bound to a free Suno account, so it has daily usage limits, but you can see how it runs: [suno.gcui.ai](https://suno.gcui.ai) ## Features - Perfectly implements the creation API from app.suno.ai - Automatically keep the account active. - Compatible with the format of OpenAI’s `/v1/chat/completions` API. - Supports Custom Mode - One-click deployment to Vercel - In addition to the standard API, it also adapts to the API Schema of Agent platforms like GPTs and Coze, so you can use it as a tool/plugin/Action for LLMs and integrate it into any AI Agent. - Permissive open-source license, allowing you to freely integrate and modify. ## Getting Started ### 1. Obtain the cookie of your app.suno.ai account 1. Head over to [app.suno.ai](https://app.suno.ai) using your browser. 2. Open up the browser console: hit `F12` or access the `Developer Tools`. 3. Navigate to the `Network tab`. 4. Give the page a quick refresh. 5. Identify the request that includes the keyword `client?_clerk_js_version`. 6. Click on it and switch over to the `Header` tab. 7. Locate the `Cookie` section, hover your mouse over it, and copy the value of the Cookie.  ### 2. Clone and deploy this project You can choose your preferred deployment method: #### Deploy to Vercel [](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fgcui-art%2Fsuno-api&env=SUNO_COOKIE&project-name=suno-api&repository-name=suno-api) #### Run locally ```bash git clone https://github.com/gcui-art/suno-api.git cd suno-api npm install ``` Alternatively, you can use [Docker Compose](https://docs.docker.com/compose/) ```bash docker compose build && docker compose up ``` ### 3. Configure suno-api - If deployed to Vercel, please add an environment variable `SUNO_COOKIE` in the Vercel dashboard, with the value of the cookie obtained in the first step. - If you’re running this locally, be sure to add the following to your `.env` file: ```bash SUNO_COOKIE=