You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8aba68a
Browse filesBrowse the repository at this point in the historyBrowse files
"description": "A description of the music, specifying style, mood, and scenario. Length: 10–2000 characters."
34
+
},
35
+
"lyrics": {
36
+
"type": "string",
37
+
"minLength": 10,
38
+
"maxLength": 3000,
39
+
"description": "Lyrics of the song. Use (\n) to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. Length: 10–3000 characters.",
40
+
"example": "[Verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[Chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes"
41
+
},
42
+
"reference_audio_url": {
43
+
"type": "string",
44
+
"format": "uri",
45
+
"description": "A URL or a Base64-encoded of the reference audio. Reference audio constraints:\n- Duration: 6 seconds to 6 minutes\n- Size: max 50 MB\n- Format: common audio formats (mp3, wav, flac, etc.)\n"
46
+
},
47
+
"audio_setting": {
48
+
"type": "object",
49
+
"properties": {
50
+
"sample_rate": {
51
+
"type": "integer",
52
+
"description": "The sampling rate of the generated music.",
53
+
"enum": [
54
+
16000,
55
+
24000,
56
+
32000,
57
+
44100
58
+
],
59
+
"default": "44100"
60
+
},
61
+
"bitrate": {
62
+
"type": "integer",
63
+
"description": "The bit rate of the generated music.",
64
+
"enum": [
65
+
32000,
66
+
64000,
67
+
128000,
68
+
256000
69
+
],
70
+
"default": "256000"
71
+
},
72
+
"format": {
73
+
"type": "string",
74
+
"enum": [
75
+
"mp3",
76
+
"wav",
77
+
"pcm"
78
+
],
79
+
"default": "mp3",
80
+
"description": "The format of the generated music."
81
+
}
82
+
}
83
+
}
84
+
},
85
+
"required": [
86
+
"model",
87
+
"prompt",
88
+
"lyrics",
89
+
"reference_audio_url"
90
+
],
91
+
"title": "minimax/music-cover"
92
+
}
93
+
}
94
+
}
95
+
},
96
+
"responses": {
97
+
"200": {
98
+
"content": {
99
+
"application/json": {
100
+
"schema": {
101
+
"type": "object",
102
+
"properties": {
103
+
"id": {
104
+
"type": "string",
105
+
"description": "The ID of the generated audio.",
106
+
"example": "60ac7c34-3224-4b14-8e7d-0aa0db708325"
107
+
},
108
+
"status": {
109
+
"type": "string",
110
+
"enum": [
111
+
"queued",
112
+
"generating",
113
+
"completed",
114
+
"error"
115
+
],
116
+
"description": "The current status of the generation task.",
117
+
"example": "completed"
118
+
},
119
+
"audio_file": {
120
+
"type": "object",
121
+
"nullable": true,
122
+
"properties": {
123
+
"url": {
124
+
"type": "string",
125
+
"format": "uri",
126
+
"description": "The URL where the file can be downloaded from.",
"description": "Description of the error, if any."
150
+
},
151
+
"meta": {
152
+
"type": "object",
153
+
"nullable": true,
154
+
"properties": {
155
+
"usage": {
156
+
"type": "object",
157
+
"nullable": true,
158
+
"properties": {
159
+
"credits_used": {
160
+
"type": "number",
161
+
"description": "The number of tokens consumed during generation.",
162
+
"example": 120000
163
+
},
164
+
"usd_spent": {
165
+
"type": "number",
166
+
"description": "The total amount of money spent by the user in USD.",
167
+
"example": 0.06
168
+
}
169
+
},
170
+
"required": [
171
+
"credits_used",
172
+
"usd_spent"
173
+
]
174
+
}
175
+
},
176
+
"description": "Additional details about the generation."
177
+
}
178
+
},
179
+
"required": [
180
+
"id",
181
+
"status"
182
+
]
183
+
}
184
+
}
185
+
}
186
+
}
187
+
},
188
+
"x-hideTryItPanel": true,
189
+
"x-codeSamples": [
190
+
{
191
+
"lang": "cURL",
192
+
"source": "curl -L \\\n --request POST \\\n --url 'https://api.aimlapi.com/v2/generate/audio' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"minimax/music-cover\",\n \"prompt\": \"Use the reference audio as the intro as it is. Then gradually begin the vocal section, expanding the arrangement with gentle piano and soft strings.\",\n \"lyrics\": \"[Intro][Verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[Chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes back\\nWarm lights flicker, memories awaken\\nIn this small cafe, I find my way\\n[Verse]\\nRaindrops tap on the windowpane\\nA melody plays, soft and low\\nThe clink of cups, the murmur of dreams\\nIn this haven, I find my home\\n[Chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes back\\nWarm lights flicker, memories awaken\\nIn this small cafe, I find my way\",\n \"reference_audio_url\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/female-vocalization.mp3\"\n }'"
193
+
},
194
+
{
195
+
"lang": "JavaScript",
196
+
"source": "async function main() {\n const response = await fetch('https://api.aimlapi.com/v2/generate/audio', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n \"model\": \"minimax/music-cover\",\n \"prompt\": \"Use the reference audio as the intro as it is. Then gradually begin the vocal section, expanding the arrangement with gentle piano and soft strings.\",\n \"lyrics\": \"[Intro][Verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[Chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes back\\nWarm lights flicker, memories awaken\\nIn this small cafe, I find my way\\n[Verse]\\nRaindrops tap on the windowpane\\nA melody plays, soft and low\\nThe clink of cups, the murmur of dreams\\nIn this haven, I find my home\\n[Chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes back\\nWarm lights flicker, memories awaken\\nIn this small cafe, I find my way\",\n \"reference_audio_url\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/female-vocalization.mp3\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
197
+
},
198
+
{
199
+
"lang": "Python",
200
+
"source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v2/generate/audio\",\n headers={\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"Bearer <YOUR_AIMLAPI_KEY>\",\n },\n json={\n \"model\": \"minimax/music-cover\",\n \"prompt\": \"Use the reference audio as the intro as it is. Then gradually begin the vocal section, expanding the arrangement with gentle piano and soft strings.\",\n \"lyrics\": \"[Intro][Verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[Chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes back\\nWarm lights flicker, memories awaken\\nIn this small cafe, I find my way\\n[Verse]\\nRaindrops tap on the windowpane\\nA melody plays, soft and low\\nThe clink of cups, the murmur of dreams\\nIn this haven, I find my home\\n[Chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes back\\nWarm lights flicker, memories awaken\\nIn this small cafe, I find my way\",\n \"reference_audio_url\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/female-vocalization.mp3\"\n }\n)\n\ndata = response.json()\nprint(data)"
"prompt": "Use the reference audio as the intro as it is. Then gradually begin the vocal section, expanding the arrangement with gentle piano and soft strings.",
13
+
"lyrics": "[Intro][Verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[Chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes back\nWarm lights flicker, memories awaken\nIn this small cafe, I find my way\n[Verse]\nRaindrops tap on the windowpane\nA melody plays, soft and low\nThe clink of cups, the murmur of dreams\nIn this haven, I find my home\n[Chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes back\nWarm lights flicker, memories awaken\nIn this small cafe, I find my way",
0 commit comments