👋 Introduction
Play GPA v3 is an amazing AI music service. Although this API is in beta test, we couldn't wait to integrate its capabilities somewhere.
We discovered that some users have the needs, so we decided to release this beta-api, hoping you'll like it.
We update quickly, please save this page for future update: api.playgpa.uk ⭐
🌟 Features
- Seamless Integration: Perfectly implements the creation API from app.playgpa.uk, ensuring smooth and efficient music generation.
- Compatibility with Leading AI Formats: Fully compatible with the format of OpenAI’s /v1/chat/completions API, facilitating easy integration with existing AI-driven systems.
- Custom Mode Support: Offers a Custom Mode that allows users to customize their music generation according to specific lyrics, styles, and titles, enhancing creative possibilities.
🚀 Getting Started
1. Obtain the cookie of your app.suno.ai account
- Head over to app.suno.ai using your browser.
- Open up the browser console: hit
F12or access theDeveloper Tools. - Navigate to the
Network tab. - Give the page a quick refresh.
- Identify the request that includes the keyword
client?_clerk_js_version. - Click on it and switch over to the
Headertab. - Locate the
Cookiesection, 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
Run locally
git clone https://github.com/gcui-art/suno-api.git
cd suno-api
npm install
3. Configure suno-api
-
If deployed to Vercel, please add an environment variable
SUNO_COOKIEin 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
.envfile:SUNO_COOKIE=<your-cookie>
4. Run suno-api
-
If you’ve deployed to Vercel:
- Please click on Deploy in the Vercel dashboard and wait for the deployment to be successful.
- Visit the
https://<vercel-assigned-domain>/api/get_limitAPI for testing.
-
If running locally:
- Run
npm run dev. - Visit the
http://localhost:3000/api/get_limitAPI for testing.
- Run
-
If the following result is returned:
{ "credits_left": 50, "period": "day", "monthly_limit": 50, "monthly_usage": 50 }
it means the program is running normally.
5. Use Play GPA API
You can check out the detailed API documentation here:
📚 API Reference
Play GPA API currently mainly implements the following APIs:
- `/api/generate`: Generate music
- `/v1/chat/completions`: Generate music - Call the generate API in a format
that works with OpenAI’s API.
- `/api/custom_generate`: Generate music (Custom Mode, support setting lyrics,
music style, title, etc.)
- `/api/generate_lyrics`: Generate lyrics based on prompt
- `/api/get`: Get music list
- `/api/get?ids=`: Get music Info by id, separate multiple id with ",".
- `/api/get_limit`: Get quota Info
- `/api/extend_audio`: Extend audio length
For more our works, please check out the streaming site: