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
"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
+
"audio_setting": {
43
+
"type": "object",
44
+
"properties": {
45
+
"sample_rate": {
46
+
"type": "integer",
47
+
"description": "The sampling rate of the generated music.",
48
+
"enum": [
49
+
16000,
50
+
24000,
51
+
32000,
52
+
44100
53
+
]
54
+
},
55
+
"bitrate": {
56
+
"type": "integer",
57
+
"description": "The bit rate of the generated music.",
58
+
"enum": [
59
+
32000,
60
+
64000,
61
+
128000,
62
+
256000
63
+
]
64
+
},
65
+
"format": {
66
+
"type": "string",
67
+
"enum": [
68
+
"mp3",
69
+
"wav",
70
+
"pcm"
71
+
],
72
+
"description": "The format of the generated music."
73
+
}
74
+
},
75
+
"required": [
76
+
"format"
77
+
]
78
+
}
79
+
},
80
+
"required": [
81
+
"model",
82
+
"prompt",
83
+
"lyrics"
84
+
],
85
+
"title": "minimax/music-2.6"
86
+
}
87
+
}
88
+
}
89
+
},
90
+
"responses": {
91
+
"200": {
92
+
"content": {
93
+
"application/json": {
94
+
"schema": {
95
+
"type": "object",
96
+
"properties": {
97
+
"id": {
98
+
"type": "string",
99
+
"description": "The ID of the generated audio.",
100
+
"example": "60ac7c34-3224-4b14-8e7d-0aa0db708325"
101
+
},
102
+
"status": {
103
+
"type": "string",
104
+
"enum": [
105
+
"queued",
106
+
"generating",
107
+
"completed",
108
+
"error"
109
+
],
110
+
"description": "The current status of the generation task.",
111
+
"example": "completed"
112
+
},
113
+
"audio_file": {
114
+
"type": "object",
115
+
"nullable": true,
116
+
"properties": {
117
+
"url": {
118
+
"type": "string",
119
+
"format": "uri",
120
+
"description": "The URL where the file can be downloaded from.",
"description": "Description of the error, if any."
144
+
},
145
+
"meta": {
146
+
"type": "object",
147
+
"nullable": true,
148
+
"properties": {
149
+
"usage": {
150
+
"type": "object",
151
+
"nullable": true,
152
+
"properties": {
153
+
"credits_used": {
154
+
"type": "number",
155
+
"description": "The number of tokens consumed during generation.",
156
+
"example": 120000
157
+
},
158
+
"usd_spent": {
159
+
"type": "number",
160
+
"description": "The total amount of money spent by the user in USD.",
161
+
"example": 0.06
162
+
}
163
+
},
164
+
"required": [
165
+
"credits_used",
166
+
"usd_spent"
167
+
]
168
+
}
169
+
},
170
+
"description": "Additional details about the generation."
171
+
}
172
+
},
173
+
"required": [
174
+
"id",
175
+
"status"
176
+
]
177
+
}
178
+
}
179
+
}
180
+
}
181
+
},
182
+
"x-hideTryItPanel": true,
183
+
"x-codeSamples": [
184
+
{
185
+
"lang": "cURL",
186
+
"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-2.0\",\n \"prompt\": \"Lo-fi pop hip-hop ambient music, slow intro: 10 s, then faster and with loud bass: 10 s\",\n \"lyrics\": \"[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 }'"
187
+
},
188
+
{
189
+
"lang": "JavaScript",
190
+
"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-2.0\",\n \"prompt\": \"Lo-fi pop hip-hop ambient music, slow intro: 10 s, then faster and with loud bass: 10 s\",\n \"lyrics\": \"[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 }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
191
+
},
192
+
{
193
+
"lang": "Python",
194
+
"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-2.0\",\n \"prompt\": \"Lo-fi pop hip-hop ambient music, slow intro: 10 s, then faster and with loud bass: 10 s\",\n \"lyrics\": \"[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 }\n)\n\ndata = response.json()\nprint(data)"
"prompt": "Lo-fi pop hip-hop ambient music, slow intro: 10 s, then faster and with loud bass: 10 s",
13
+
"lyrics": "[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