Minimax Music
An advanced AI model that generates diverse high-quality audio compositions by analyzing and reproducing musical patterns, rhythms, and vocal styles from the reference track. Refine the process using a text prompt.
How to Make a Call
API Schemas
Generate a music sample
This endpoint creates and sends a music generation task to the server — and returns a generation ID and the task status.
Bearer key
Lyrics with optional formatting. You can use a newline to separate each line of lyrics. You can use two newlines to add a pause between lines. You can use double hash marks (##) at the beginning and end of the lyrics to add accompaniment. Maximum 600 characters.
Reference song, should contain music and vocals. Must be a .wav or .mp3 file longer than 15 seconds.
{
"id": "text",
"status": "queued"
}Retrieve the generated music sample from the server
After sending a request for music generation, this task is added to the queue. Based on the service's load, the generation can be completed in 50-60 seconds or take a bit more.
Bearer key
<REPLACE_WITH_YOUR_GENERATION_ID>The ID of the generated audio.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl -L \
--request GET \
--url 'https://api.aimlapi.com/v2/generate/audio?generation_id=<REPLACE_WITH_YOUR_GENERATION_ID>' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>'{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"audio_file": {
"url": "https://cdn.aimlapi.com/eagle/files/lion/5N4F_QWb5K8rDSHfpUN0S_output.wav"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000
}
}
}Quick Code Example
Here is an example of generation an audio file based on a sample and a prompt using the music model minimax-music.
Listen to the track we generated:
Last updated
Was this helpful?