MaaS_Mureka
Update Log: Added support for the MaaS_Mureka_v9 model, and the pure music generation interface added v8/v9 models
General Instructions
Request Protocol
-
Protocol: HTTP
-
Header:
| Parameter Name | Value |
|---|---|
| Authorization | Bearer |
| Content-Type | application/json |
1️⃣ File Upload
Interface Information
-
Method : POST
-
URL:
https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/files/upload -
Encoding:
multipart/form-data
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| file | file | is | Content of the file to be uploaded |
| purpose | string | is | Document Purpose (see table below) |
Explanation of purpose value
| Usage | Description | Format Requirements | Duration Requirement |
|---|---|---|---|
reference |
Reference Music | mp3, m4a | 30 seconds (beyond cropping) |
vocal |
Human Voice Timbre | mp3, m4a | 15-30 seconds (beyond cropping) |
melody |
Melody | mp3, m4a, mid | 5-60 seconds (cropped if exceeded) |
instrumental |
Pure Music Reference | mp3, m4a | 30 seconds (beyond cropping) |
voice |
Sound | mp3, m4a | 5-15 seconds (cropped if exceeded) |
audio |
Universal Audio | mp3, m4a | Used for song expansion, etc. |
Request Example
curl 'https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/files/upload' \
-H 'Authorization: Bearer ${Your AK}' \
-F 'file=@"/path/to/your/music.mp3"' \
-F 'purpose="audio"'
Response Parameter
| Field | Type | Description |
|---|---|---|
| id | string | File identifier, used for subsequent API reference |
| bytes | integer | File Size (ByteDance) |
| created_at | integer | Creation Timestamp (seconds) |
| filename | string | File Name |
| purpose | string | Document Purpose |
Response Example
{
"trace_id": "b4f3edecf8288f19652102e17eab3c91",
"id": "114045503930371",
"bytes": 3637542,
"created_at": 1767059534,
"filename": "music.mp3",
"purpose": "audio"
}
2️⃣ Generate Song
Interface Information
-
Method : POST
-
URL:
https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/song/generate
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| lyrics | string | ✅ Yes | Lyric Content |
| model | string | No | Model version: MaaS_Mureka_v7.5_generate, MaaS_Mureka_v9, MaaS_Mureka_o1_generate |
| n | int | No | Generated quantity, maximum 3, default 2 |
| prompt | string | No | Song prompt, up to 1024 characters. Other control options will be disabled after selection. |
| reference_id | string | No | Reference Music ID (purpose: reference). After selection, prompt and melody_id become invalid |
| vocal_id | string | No | Timbre ID (purpose: vocal). After selection, prompt and melody_id become invalid |
| melody_id | string | No | Melody ID (purpose: melody). After selection, prompt, reference_id, and vocal_id become invalid |
| instrumental_id | string | No | Pure music reference ID (purpose: instrumental) |
| stream | boolean | No | Whether to stream. When true, it can play while generating.Not supported by the o1 model |
Request Example
Use the v9 model (recommended)
curl 'https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/song/generate' \
-H 'Authorization: Bearer ${Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"lyrics": "[Verse 1]\nYouth blooms like flowers\nDreams soar in the heart\n\n[Chorus]\nYouth and dreams\nForever in the heart",
"model": "MaaS_Mureka_v9",
"n": 1,
"stream": true,
"prompt": "Create a pop song about youthful dreams"
}'
Use the v7.5 model
curl 'https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/song/generate' \
-H 'Authorization: Bearer ${Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"lyrics": "[Verse 1]\nYouth blooms like flowers\nDreams soar in the heart",
"model": "MaaS_Mureka_v7.5_generate",
"n": 1,
"prompt": "Pop song style"
}'
Response Parameter
| Field | Type | Description |
|---|---|---|
| taskId | string | Asynchronous Task ID |
| created_at | integer | Creation Timestamp (seconds) |
| finished_at | integer | Completion timestamp (seconds) |
| model | string | Model Used |
| status | string | Status: preparing, queued, running, streaming, succeeded, failed, timeouted, cancelled |
| failed_reason | string | Failure Reason |
Response Example
{
"code": 0,
"data": {
"taskId": "113923099721729",
"created_at": 1767001167,
"finished_at": null,
"model": "MaaS_Mureka_v9",
"status": "preparing",
"failed_reason": null
},
"code_msg": "success",
"trace_id": "eb174f86b6c59ba838ce4401b01678eb"
}
3️⃣ Generate instrumental music
Interface Information
-
Method : POST
-
URL:
https://genaiapi.cloudsway.net/v1/ai/${Yourendpoint}/mureka/instrumental/generate
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | No | Model Version:MaaS_Mureka_v7.5_generate,MaaS_Mureka_v8,MaaS_Mureka_v9, use auto to select the latest version |
| n | int | No | Generation quantity, maximum 3, default 2 |
| prompt | string | No | The prompt controls the generation of instrumental music, with a maximum of 1024 characters. After selection, instrumental_id becomes invalid |
| instrumental_id | string | No | Reference Music ID (purpose: instrumental). Prompt becomes invalid after selection |
| stream | boolean | No | Whether to stream. v7.5/v8/v9 all support streaming |
Model Version Feature Comparison
| Model | Music Quality | Generation Speed | Style Diversity | Streaming Support |
|---|---|---|---|---|
| MaaS_Mureka_v7.5_generate | Standard | Quick | Medium | ✅ |
| MaaS_Mureka_v8 | Higher | Medium | Rich | ✅ |
| MaaS_Mureka_v9 | Maximum | Medium | richest | ✅ |
Request Example
Use the v9 model (recommended)
curl 'https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/instrumental/generate' \
-H 'Authorization: Bearer ${Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "Create a serene piano background music, suitable for meditation and relaxation",
"model": "MaaS_Mureka_v9",
"n": 1,
"stream": true
}'
Use the v8 model
curl 'https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/instrumental/generate' \
-H 'Authorization: Bearer ${Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "Epic orchestral music, full of power and hope",
"model": "MaaS_Mureka_v8",
"n": 1
}'
Use reference music (v9 model)
curl 'https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/instrumental/generate' \
-H 'Authorization: Bearer ${Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"instrumental_id": "114045503930371",
"model": "MaaS_Mureka_v9",
"n": 1
}'
Response Parameter
Same as the song generation interface, returns taskId for querying.
{
"code": 0,
"data": {
"taskId": "113923099721730",
"created_at": 1767001167,
"model": "MaaS_Mureka_v9",
"status": "preparing"
},
"code_msg": "success"
}
4️⃣ Continue writing the song
Interface Information
-
Method : POST
-
URL:
https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/song/extend
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| song_id | string | No | Song ID to be extended (generated by song/generate). Mutually exclusive with upload_audio_id |
| upload_audio_id | string | No | Reference music ID (purpose: reference). Mutually exclusive with song_id |
| lyrics | string | ✅ Yes | Content of the continued lyrics |
| extend_at | string | ✅ Yes | Extended start time (milliseconds), valid range [8000, 420000]. If it is greater than the song duration, it defaults to the song duration. |
Note : The continuation function only supports songs and does not support instrumental music. The model used for continuation is the same as the one used when the original song was generated.
Request Example
curl 'https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/song/extend' \
-H 'Authorization: Bearer ${Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"song_id": "113875917733890",
"extend_at": "8000",
"lyrics": "[Verse]\nIn the stormy night, I wander alone\nLost in the rain, feeling like I have been thrown"
}'
Response Parameters
Same as the interface for generating songs, returns taskId.
{
"code": 0,
"data": {
"taskId": "113893286346753",
"created_at": 1767001167,
"model": "MaaS_Mureka_v9",
"status": "preparing"
},
"code_msg": "success"
}
5️⃣ Query Task
Interface Information
| Task Type | Query URL |
|---|---|
| Song Task | /mureka/song/query/{task_id} |
| Instrumental Music Task | /mureka/instrumental/query/{task_id} |
- Method : GET
Request Example
curl 'https://genaiapi.cloudsway.net/v1/ai/${Your endpoint}/mureka/song/query/113923099721729' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${Your AK}'
Response Parameter
| Field | Type | Description |
|---|---|---|
| taskId | string | Task ID |
| status | string | Task Status |
| finished_at | integer | Completion Timestamp |
| choices | array | Generate Result List |
Description of the choices field
| Field | Type | Description |
|---|---|---|
| id | string | Generate the ID of the song/pure music |
| url | string | Audio URL (MP3), valid for 1 month |
| wav_url | string | WAV Lossless Format URL |
| flac_url | string | FLAC Lossless Format URL |
| stream_url | string | Streaming URL (only when stream=true) |
| duration | integer | Duration (milliseconds) |
| lyrics_sections | array | Lyric segmentation information (only for songs) |
lyrics_sections Structure
| Field | Description |
|---|---|
| section_type | Section type: intro, verse, pre-chorus, chorus, bridge, break, outro |
| start/end | Segment start and end time (milliseconds) |
| lines | Lyric line, containing start/end/text/words |
Response Example (Song Task - Success)
{
"code": 0,
"data": {
"taskId": "113905426890753",
"created_at": 1766992740,
"finished_at": 1766992759,
"model": "MaaS_Mureka_v9",
"status": "succeeded",
"failed_reason": null,
"choices": [
{
"id": "113905464770561",
"url": "https://cdn.mureka.ai/.../song.mp3",
"wav_url": "https://cdn.mureka.ai/.../song.wav",
"flac_url": "https://cdn.mureka.ai/.../song.flac",
"duration": 41540,
"lyrics_sections": [
{
"section_type": "intro",
"start": 2400,
"end": 2800,
"lines": [
{
"start": 2400,
"end": 2800,
"text": "Float song"
}
]
}
]
}
]
},
"code_msg": "success"
}
Response Example (Pure Music Task - Success)
{
"code": 0,
"data": {
"taskId": "113905426890754",
"created_at": 1766992740,
"finished_at": 1766992759,
"model": "MaaS_Mureka_v9",
"status": "succeeded",
"failed_reason": null,
"choices": [
{
"id": "113905464770562",
"url": "https://cdn.mureka.ai/.../instrumental.mp3",
"wav_url": "https://cdn.mureka.ai/.../instrumental.wav",
"flac_url": "https://cdn.mureka.ai/.../instrumental.flac",
"duration": 120000
}
]
},
"code_msg": "success"
}
Document Update Date: 2026-04-29
Latest Update: New MaaS_Mureka_v9 model added, and the pure music generation interface now supports v8/v9 models