mureka-music-v9) through TokenHub, which provides three generation capabilities: song generation from lyrics, song generation from prompts, and instrumental music generation.Model Name | model Parameter Value | Supported Capability | Lyrics Limit | Prompt Limit |
Mureka-Music-v9 | mureka-music-v9 | Lyric-based song generation / Prompt-based song generation / Instrumental music generation | 5000 characters | Prompt-based song generation: 2000 characters; style prompts for lyric-based song generation and instrumental music prompts: 1024 characters |
n parameter is 2 for all three capabilities, and billing is based on the number of generated songs. If you need only 1 song, explicitly pass "n": 1.POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/mureka-music/generationParameter Name | Required | Type | Description |
model | Yes | string | Model ID. Value: mureka-music-v9 |
lyrics | Yes | string | Lyrics content, with a maximum length of 5000 characters. Supports using section tags to organize song structure: [Intro], [Verse], [Pre-Chorus], [Chorus], [Bridge], [Outro]. |
prompt | No | string | Style prompt that controls the genre, mood, vocals, and other aspects (such as r&b, slow, passionate, male vocal), with a maximum length of 1024 characters. |
gender | No | string | Vocal gender preference. Optional values: female, male. |
n | No | integer | Number of songs generated per request, with a value range of [1, 3] and a default value of 2. |
# Generate a song from lyricscurl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/mureka-music/generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "mureka-music-v9","lyrics": "[Verse]\\nWalking through the city lights at midnight\\n[Chorus]\\nHold on to the memories","prompt": "pop, emotional, female vocal, slow tempo","gender": "female","n": 1}'
Field | Type | Description |
id | string | Task ID. |
created_at | integer | Task creation time, Unix timestamp, in seconds. |
finished_at | integer | Task completion time, Unix timestamp, in seconds. |
model | string | Model used for music generation. |
status | string | Task status, enum values: preparing, queued, running, streaming, reviewing, succeeded, failed, timeouted, cancelled. |
failed_reason | string | Reason for task failure. Returned when status is failed. |
watermarked | boolean | Whether to add a 5-second watermark audio at the end of the music. true indicates that it is added. |
choices | array[object] | List of generated results. Returned only when status is succeeded. The number of elements is consistent with the requested n. |
choices[].url | string | Download URL of the generated audio. It is a temporary URL. Download and store it promptly. |
tokenhub_usage.total_tokens | integer | Number of tokens consumed by this task, used for billing/reconciliation. |
request_id | string | Unique request identifier, used for troubleshooting. |
{"id": "1256342408-WandAudio-c6313c32b0b74c648f401571c515be00","created_at": 1790166087,"finished_at": 1790166137,"model": "mureka-9","status": "succeeded","choices": [{"url": "https://xxxx.mp3","flac_url": "https://xxxx.mp3","duration": 162630,"lyrics_sections": [{"section_type": "verse","start": 12120,"end": 20240,"lines": [{"start": 12120,"end": 20240,"text": "Walking through the city lights at midnight","words": [{"start": 12120,"end": 12200,"text": "Walking "},{"start": 13160,"end": 13200,"text": "through "},{"start": 13800,"end": 13840,"text": "the "},{"start": 14120,"end": 14160,"text": "city "},{"start": 14560,"end": 15560,"text": "lights "},{"start": 18640,"end": 18680,"text": "at "},{"start": 19040,"end": 20240,"text": "midnight"}]}]},{"section_type": "chorus","start": 38280,"end": 76800,"lines": [{"start": 38280,"end": 76800,"text": "Hold on to the memories","words": [{"start": 38280,"end": 40520,"text": "Hold "},{"start": 40920,"end": 40960,"text": "on "},{"start": 55920,"end": 55960,"text": "to "},{"start": 71800,"end": 71840,"text": "the "},{"start": 74320,"end": 76800,"text": "memories"}]}]}],"id": "162503562821633","wav_url": "https://xxxx.mp3"}],"trace_id": "4c0611edea3fc3493c82c3db7e71cb50","watermarked": true,"tokenhub_usage": {"total_tokens": 33000},"request_id": "1019e5dc-a80b-43b7-9122-6a325d01ca97"}
POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/mureka-music/easy-generationParameter Name | Required | Type | Description |
model | Yes | string | Model ID. Value: mureka-music-v9 |
prompt | Yes | string | Prompt that describes the desired song content, mood, and visual imagery, with a maximum length of 2000 characters. |
styles | No | array[string] | List of styles. Select one or more styles from the enumerated values: pop,rock,jazz,r&b,edm,ambient,folk,latin,k-pop,j-pop,house,gospel,lo-fi. |
n | No | integer | Number of songs generated per request, with a value range of [1, 3] and a default value of 2. |
# Generate a song from promptscurl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/mureka-music/easy-generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "mureka-music-v9","prompt": "A love song with a bright summer vibe and a catchy chorus","styles": ["pop", "rock"],"n": 1}'
POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/mureka-music/instrumental-generationParameter Name | Required | Type | Description |
model | Yes | string | Model ID. Value: mureka-music-v9 |
prompt | Yes | string | Prompt that describes the desired instrumental music style and scene, with a maximum length of 1024 characters. |
n | No | integer | Number of instrumental music pieces generated per request, with a value range of [1, 3] and a default value of 2. |
# Generate instrumental musiccurl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/mureka-music/instrumental-generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "mureka-music-v9","prompt": "lo-fi, cozy, warm piano and soft drums, late night study vibe","n": 1}'
Error Code | Overview |
400 - Invalid Request | Cause: The request parameters are incorrect. Solution: See the documentation to enter the correct request parameters. |
401 - Invalid Authentication | Cause: The authentication is invalid. Solution: Ensure that you use the correct API key. |
403 - Forbidden | Cause: You are accessing the API from an unsupported region. Solution: Ensure that your access originates from a supported region. |
429 - Rate limit reached for requests | Cause: You are sending requests too quickly. Solution: Control the request rate and check the concurrent request limit in the pricing plan. |
429 - You exceeded your current quota, please check your billing details | Cause: Your prepaid balance has been used up. Solution: Top up your account. |
451 - Unavailable For Legal Reasons | Cause: The request parameters failed the security review. Solution: Modify the request parameters. |
500 - The server had an error while processing your request | Cause: A problem occurred with our service. Solution: Retry your request later. If the issue persists, contact us. |
503 - The engine is currently overloaded, please try again later | Cause: Our service is under heavy load. Solution: Retry your request later. |
n parameter defaults to 2, and billing is based on the number of generated songs. If you need only 1 song, explicitly pass "n": 1 in the request. You can pass up to 3.[Intro] (intro), [Verse] (verse), [Pre-Chorus] (pre-chorus), [Chorus] (chorus), [Bridge] (bridge), and [Outro] (outro). You can also use prompt to supplement the genre, mood, and vocal description (for example, r&b, slow, passionate, male vocal), and use gender to specify the vocal gender preference.styles is a fixed style enum (13 styles including pop, rock, and jazz) used to define the broad genre category, and it is supported only for prompt-based song generation. prompt is free-form text used to describe the song theme, mood, and visual imagery. Both can be passed together and take effect collectively in the model.watermarked being true indicates that it has been added.choices[].url is a temporary address stored for 12 hours. Download and save it promptly after the task succeeds, and do not reference this link over the long term.フィードバック