Minimax Music-01
Generate up to 60 seconds of music with both accompaniment and vocals in a single pass, with vocals from lyrics and a reference track.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/minimax-music-01"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "lyrics": "[verse] \n In the silence, I hear your name \n Echoes of love that still remain \n Fading lights and midnight rain \n I’m lost in yesterday again \n [chorus] \n But I still dream, I still try \n To hold your ghost beneath the sky ",
12 "bitrate": 256000,
13 "song_file": "https://replicate.delivery/pbxt/M9zum1Y6qujy02jeigHTJzn0lBTQOemB7OkH5XmmPSC5OUoO/MiniMax-Electronic.wav",
14 "sample_rate": 44100
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20 result = response.json()
21 print(json.dumps(result, indent=2))
22else:
23 print(f"Error: {response.status_code}")
24 print(response.text)
1import requests
2import json
3
4url = "https://api.segmind.com/v1/minimax-music-01"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "lyrics": "[verse] \n In the silence, I hear your name \n Echoes of love that still remain \n Fading lights and midnight rain \n I’m lost in yesterday again \n [chorus] \n But I still dream, I still try \n To hold your ghost beneath the sky ",
12 "bitrate": 256000,
13 "song_file": "https://replicate.delivery/pbxt/M9zum1Y6qujy02jeigHTJzn0lBTQOemB7OkH5XmmPSC5OUoO/MiniMax-Electronic.wav",
14 "sample_rate": 44100
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20 result = response.json()
21 print(json.dumps(result, indent=2))
22else:
23 print(f"Error: {response.status_code}")
24 print(response.text)
API Endpoint
https://api.segmind.com/v1/minimax-music-01
Parameters
bitrate
optionalinteger
An enumeration.
256000
32000
64000
128000
256000
instrumental_file
optionalstring (uri)
Instrumental reference. Must be a .wav or .mp3 file longer than 15 seconds. If only an instrumental reference is given, a track without vocals will be generated.
null
instrumental_id
optionalstring
Previously used instrumental ID
null
lyrics
optionalstring
Format your lyrics using newlines to separate each line. Use two newlines to add a pause. Wrap the lyrics with ## to include accompaniment. Max 400 characters.
"[verse] \n In the silence, I hear your name \n Echoes of love that still remain \n Fading lights and midnight rain \n I’m lost in yesterday again \n [chorus] \n But I still dream, I still try \n To hold your ghost beneath the sky "
sample_rate
optionalinteger
Sample rate for the output file.
44100
16000
24000
32000
44100
song_file
optionalstring (uri)
Reference song. Should include both music and vocals; Supported formats: wav or .mp3; Minimum length: 15 seconds
"https://replicate.delivery/pbxt/M9zum1Y6qujy02jeigHTJzn0lBTQOemB7OkH5XmmPSC5OUoO/MiniMax-Electronic.wav"
voice_file
optionalstring (uri)
Reference file for voice; Must be a .wav or .mp3 file longer than 15 seconds. If only a voice reference is given, an a cappella vocal hum will be generated.
null
voice_id
optionalstring
Previously used voice ID
null
Response Type
Returns: Audio
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out