Generate music based on a given text prompt using the Suno AI API with v3.5 AI model
Suno AI's innovative Audio Input feature allows users to upload or record their own audio to craft unique songs.
Our advanced AI technology interprets your input to generate high-quality music that aligns perfectly with your vision.
Whether you are developing applications in Python, JavaScript, Node.js, or other popular languages, AI/ML API's API is designed to integrate smoothly into your existing tech stack.
Suno AI provides flexibility in music generation with its multiple models, allowing users to choose between chirp-v3-5 and chirp-v3-0
The chirp-v3-5 model excels in producing high-fidelity, complex compositions, making it ideal for professional projects. For simpler, more straightforward music generation, opt for the chirp-v3-0 model.
Once you've input your prompt and selected the appropriate model, initiate the music generation process. Suno AI will create and deliver two high-quality audio files based on your specifications.
By leveraging the Fetch Music Generation Details endpoint, you can efficiently manage and track your music generation projects, ensuring you have all the necessary information at your fingertips.
Generate music based on a given text prompt using the Suno v3.5 model
import requests
url = "https://api.aimlapi.com/generate"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"prompt": "Create a relaxing ambient music track",
"make_instrumental": True,
"wait_audio": True
}
response = requests.post(url, json=payload, headers=headers)
print(response.content)
import requests
url = "https://api.aimlapi.com/generate/custom-mode"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"prompt": "Create an energetic dance music track",
"tags": "dance, energetic",
"title": "Dance Track",
"make_instrumental": False,
"wait_audio": True
}
response = requests.post(url, json=payload, headers=headers)
print(response.content)
This feature allows you to specify various elements such as mood, style, and instrumentation, giving you complete creative control over the music production process.