All Templates / AI/ML
Suno-API
REST API for Suno AI for interacting with Suno AI's music generator.
Suno-API-Service
Malith-Rukshan/Suno-API
Just deployed
📚 SunoAI API Library is an unofficial Python client for interacting with Suno AI's music generator. This library facilitates generating music using Suno's Chirp v3 model and includes main functions of Suno AI with a built-in music downloader. It can be deployed as a REST API using FastAPI, Local, Docker, on a PaaS provider like Heroku.
📋 Before deploy REST API, you must sign up on the suno.ai website and obtain your cookie as shown in repo README.md file. Set the cookie in SUNO_COOKIE at Environmental variables section.
💡 You can find cookie from the Web Browser's Developer Tools -> Network Tab
1. Generate Music
POST /generate
Request Body:
{
"prompt": "A serene melody about the ocean",
"is_custom": false,
"tags": "relaxing, instrumental",
"title": "Ocean Waves",
"make_instrumental": true,
"wait_audio": true
}
Response:
[
{
"id": "124b735f-7fb0-42b9-8b35-761aed65a7f6",
"video_url": "",
"audio_url": "https://audiopipe.suno.ai/item_id=124b735f-7fb0-42b9-8b35-761aed65a7f6",
"image_url": "https://cdn1.suno.aiimage_124b735f-7fb0-42b9-8b35-761aed65a7f6.png",
"image_large_url": "https://cdn1.suno.aiimage_large_124b735f-7fb0-42b9-8b35-761aed65a7f.png",
"is_video_pending": False,
"major_model_version": "v3",
"model_name": "chirp-v3",
"metadata": {
"tags": "English men voice",
"prompt": "I found a love, for me\nDarling,just dive right in and follow mylead\nWell, I found a girl, beautiful andsweet\nOh, I never knew you were thesomeone waiting for me\n\n′Cause we werejust kids when we fell in love\nNot knowingwhat it was\nI will not give you up thistime\nBut darling, just kiss me slow\nYourheart is all I own\nAnd in your eyes,you're holding mine\n\nBaby, I′m dancing inthe dark\nWith you between myarms\nBarefoot on the grass\nListening toour favourite song\nWhen you said youlooked a mess\nI whispered underneath mybreath\nBut you heard it\nDarling, you lookperfect tonight",
"gpt_description_prompt": None,
"audio_prompt_id": None,
"history": None,
"concat_history": None,
"type": "gen",
"duration": None,
"refund_credits": None,
"stream": True,
"error_type": None,
"error_message": None
},
"is_liked": False,
"user_id":"2340653f-32cb-4343-artb-09203ty749e9",
"display_name": "Snonymous",
"handle": "anonymous",
"is_handle_updated": False,
"is_trashed": False,
"reaction": None,
"created_at": "2024-05-05T11:54:09.356Z",
"status": "streaming",
"title": "Perfect by Malith-Rukshan/Suno-API",
"play_count": 0,
"upvote_count": 0,
"is_public": False
}
]
2. Retrieve Songs
POST /songs
{
"song_ids": "uuid-format-1234,4567-abcd"
}
/generate
Response3. Get a Specific Song
POST /get_song
{
"song_id": "uuid-song-id"
}
/generate
Response but Only Clip4. Retrieve Credit Information
GET /credits
{
"credits_left": 50,
"period": "2024-05",
"monthly_limit": 100,
"monthly_usage": 25
}
> According to Suno.ai Each song generation consumes 5 credits, thus a total of 10 credits is necessary for each successful call.
This project is distributed under the MIT License. This license allows everyone to use, modify, and redistribute the code. However, it comes with no warranties regarding its functionality. For more details, see the LICENSE file in the repository.
If you found this project helpful, don't forget to give it a ⭐ on GitHub. This helps others find and use the project too! 🫶
Join our Telegram channels,
If you have any questions, feedback, or just want to say hi, you can reach out to me:
🧑💻 Built with 💖 by Single Developers
Template Content
Suno-API-Service
Malith-Rukshan/Suno-APISUNO_COOKIE
Sign up on the suno.ai website and obtain your cookie. Refer README.md file to tutorial.
Details
Malith Rukshan
Created on May 9, 2024
32 total projects
24 active projects
Python, Dockerfile
AI/ML
More templates in this category
firecrawl
firecrawl api server + worker without auth, works with dify
Neuron Capital
74