Skip to content

Commit 8aba68a

Browse files
feat: gen minimax/music-cover
1 parent 1c54a36 commit 8aba68a

2 files changed

Lines changed: 229 additions & 6 deletions

File tree

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
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-cover"
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+
"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.",
127+
"example": "https://cdn.aimlapi.com/generations/hippopotamus/1757963033314-8ca7729d-b78c-4d4c-9ef9-89b2fb3d07e8.mp3"
128+
}
129+
},
130+
"required": [
131+
"url"
132+
]
133+
},
134+
"error": {
135+
"type": "object",
136+
"nullable": true,
137+
"properties": {
138+
"name": {
139+
"type": "string"
140+
},
141+
"message": {
142+
"type": "string"
143+
}
144+
},
145+
"required": [
146+
"name",
147+
"message"
148+
],
149+
"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)"
201+
}
202+
]
203+
}
204+
}
205+
},
206+
"components": {
207+
"securitySchemes": {
208+
"access-token": {
209+
"scheme": "bearer",
210+
"bearerFormat": "<YOUR_AIMLAPI_KEY>",
211+
"type": "http",
212+
"description": "Bearer key"
213+
}
214+
}
215+
}
216+
}
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
[
22
{
3-
"name": "moonshot/kimi-k2-6",
4-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/chat-completions&model=moonshot/kimi-k2-6",
5-
"alias": "kimi-k2-6",
6-
"category": "text-models-llm",
7-
"vendor": "Moonshot",
8-
"codeSamples": "chat-completion"
3+
"name": "minimax/music-cover",
4+
"url": "https://ai.aimlapi.com/docs-json?endpoint=internal/audio-generations/submit&model=minimax/music-cover",
5+
"alias": "music-cover",
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-cover",
12+
"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",
14+
"reference_audio_url": "https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/female-vocalization.mp3"
15+
}
916
}
1017
]

0 commit comments

Comments
 (0)