Skip to content

Commit 2e9493e

Browse files
feat: gen minimax/music-2.6
1 parent 174f0e2 commit 2e9493e

2 files changed

Lines changed: 222 additions & 14 deletions

File tree

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
{
2+
"openapi": "3.0.0",
3+
"info": {
4+
"title": "AIML API",
5+
"version": "1.0.0"
6+
},
7+
"servers": [
8+
{
9+
"url": "https://api.aimlapi.com"
10+
}
11+
],
12+
"paths": {
13+
"/v2/generate/audio": {
14+
"post": {
15+
"operationId": "_v2_generate_audio",
16+
"requestBody": {
17+
"required": true,
18+
"content": {
19+
"application/json": {
20+
"schema": {
21+
"type": "object",
22+
"properties": {
23+
"model": {
24+
"type": "string",
25+
"enum": [
26+
"minimax/music-2.6"
27+
]
28+
},
29+
"prompt": {
30+
"type": "string",
31+
"minLength": 10,
32+
"maxLength": 2000,
33+
"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.",
121+
"example": "https://cdn.aimlapi.com/generations/hippopotamus/1757963033314-8ca7729d-b78c-4d4c-9ef9-89b2fb3d07e8.mp3"
122+
}
123+
},
124+
"required": [
125+
"url"
126+
]
127+
},
128+
"error": {
129+
"type": "object",
130+
"nullable": true,
131+
"properties": {
132+
"name": {
133+
"type": "string"
134+
},
135+
"message": {
136+
"type": "string"
137+
}
138+
},
139+
"required": [
140+
"name",
141+
"message"
142+
],
143+
"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)"
195+
}
196+
]
197+
}
198+
}
199+
},
200+
"components": {
201+
"securitySchemes": {
202+
"access-token": {
203+
"scheme": "bearer",
204+
"bearerFormat": "<YOUR_AIMLAPI_KEY>",
205+
"type": "http",
206+
"description": "Bearer key"
207+
}
208+
}
209+
}
210+
}
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
[
22
{
3-
"name": "bytedance/seedance-2-0",
4-
"url": "https://ai.aimlapi.com/docs-json?endpoint=internal/video-generations/submit&model=bytedance/seedance-2-0",
5-
"alias": "seedance-2-0",
6-
"category": "video-models",
7-
"vendor": "ByteDance",
8-
"codeSamples": "video:video"
9-
},
10-
{
11-
"name": "bytedance/seedance-2-0-fast",
12-
"url": "https://ai.aimlapi.com/docs-json?endpoint=internal/video-generations/submit&model=bytedance/seedance-2-0-fast",
13-
"alias": "seedance-2-0-fast",
14-
"category": "video-models",
15-
"vendor": "ByteDance",
16-
"codeSamples": "video:video"
3+
"name": "minimax/music-2.6",
4+
"url": "https://ai.aimlapi.com/docs-json?endpoint=internal/audio-generations/submit&model=minimax/music-2.6",
5+
"alias": "music-2.6",
6+
"category": "music-models",
7+
"vendor": "MiniMax",
8+
"codeSamples": "custom",
9+
"customUrlApi": "https://api.aimlapi.com/v2/generate/audio",
10+
"customParams":{
11+
"model": "minimax/music-2.0",
12+
"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..."
14+
}
1715
}
1816
]

0 commit comments

Comments
 (0)