minimax-music-v3.0.YOUR_API_KEY with your own API Key. The authentication method is the request header Authorization: Bearer YOUR_API_KEY.Model Name | model ID | Supported Capability | Lyrics Limit | Prompt Limit | Selection Recommendations |
MiniMax-Music-v3.0 | minimax-music-v3.0 | Song generation (vocals) / Instrumental music / Automatic lyric writing | 3500 characters | 2000 characters | Overall sound quality is significantly improved, and vocal synthesis is more natural. |
POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-music/generationParameter Name | Required | Type | Description |
model | Yes | string | Model version. Value: minimax-music-v3.0 |
prompt | Conditionally required | string | Music description used to specify the style, mood, and scene, such as "Pop, melancholic, perfect for a rainy night". Length limit: [0, 2000] characters. Required when instrumental music is generated ( is_instrumental: true), with a length limit of [1, 2000] characters. |
lyrics | Conditionally required | string | Song lyrics, with each line separated by \\n. Supported structure tags: [Intro], [Verse], [Pre Chorus], [Chorus], [Interlude], [Bridge], [Outro], [Post Chorus], [Transition], [Break], [Hook], [Build Up], [Inst], [Solo]. Required when songs with vocals are generated, with a length limit of [1, 3500] characters; optional for instrumental music. |
lyrics_optimizer | No | boolean | Whether to automatically generate lyrics based on the prompt description. When set to true and lyrics is empty, the system automatically writes lyrics based on the prompt. Default value: false. |
is_instrumental | No | boolean | Whether to generate instrumental music (without vocals). When set to true, lyrics is optional. Default value: false. |
output_format | No | string | Audio return format. Optional values: hex (hexadecimal encoding, default) / url (download link, valid for 12 hours). |
audio_setting | No | object | Audio output configuration. See the table below for subfields. |
aigc_watermark | No | boolean | Whether to add a watermark at the end of the audio. Default value: false. |
Parameter Name | Required | Type | Description |
sample_rate | No | integer | Sample rate (Hz), for example, 44100 |
bitrate | No | integer | Bitrate (bps), for example, 256000 |
format | No | string | Audio format, for example, mp3 |
lyrics (required) + prompt (optional).lyrics_optimizer: true, leave lyrics empty, and use prompt to describe the song theme.is_instrumental: true + prompt (required). No lyrics is needed.curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-music/generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "minimax-music-v3.0","prompt": "Pop, melancholic, perfect for a rainy night","lyrics_optimizer": true,"output_format":"url"}'
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-music/generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "minimax-music-v3.0","prompt": "Indie folk, Melancholic, Introspective, Coffeehouse","lyrics": "[verse]\\nStreetlights glow faintly, the evening breeze gently strokes\\nShadows stretch long as I wander alone\\nAn old coat wraps me in deep melancholy\\nNot knowing where to go, longing for somewhere\\n[chorus]\\nPush open the wooden door, aroma fills the air\\nA familiar corner, strangers glance","output_format": "url","audio_setting": {"sample_rate": 44100,"bitrate": 256000,"format": "mp3"}}'
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-music/generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "minimax-music-v3.0","prompt": "Soothing piano music, suitable for focused studying, calm and relaxing","is_instrumental": true}'
Field | Type | Description |
data | object | Generated result data object. |
data.audio | string | Audio content. When output_format=hex, it is hexadecimal-encoded audio data; when output_format=url, it is an audio download link (valid for 12 hours). |
data.status | integer | Generation status: 1 generating / 2 completed. |
trace_id | string | ID of the requested task, used for troubleshooting. |
extra_info | object | Audio information object. |
extra_info.music_duration | integer | Audio duration (milliseconds). |
extra_info.music_sample_rate | integer | Sample rate (Hz). |
extra_info.music_channel | integer | Number of channels. |
extra_info.bitrate | integer | Bitrate (bps). |
extra_info.music_size | integer | Audio file size (bytes). |
base_resp | object | Status code object. |
base_resp.status_code | integer | Status code; 0 indicates success. |
base_resp.status_msg | string | Status description. |
usage | object | Usage consumption. |
usage.total_tokens | integer | Number of tokens consumed by this task. |
request_id | string | Unique request identifier, used for troubleshooting. |
{"data": {"audio": "hex-encoded audio data or URL","status": 2},"trace_id": "4-WandAudio-37d8fc5946e6419380fa5627fe6ae5ff","extra_info": {"music_duration": 25364,"music_sample_rate": 44100,"music_channel": 2,"bitrate": 256000,"music_size": 813651},"base_resp": {"status_code": 0,"status_msg": "success"},"usage": {"total_tokens": 100000},"request_id": "3aec3299-06ad-4654-8b45-c57b823a15d2"}
output_format=hex (default), data.audio is a hex-encoded string. Decode it as hex and write it to an audio file (such as output.mp3) for playback. When output_format=url, data.audio directly returns a download link.base_resp.status_code in the response body is not 0. For the specific reason, see base_resp.status_msg. Common failure scenarios:Failure Scenario | Handling Recommendation |
Authentication Failure | Check whether the API Key is correct and whether the TokenHub service is enabled. |
Missing Required Parameter | Check the parameter combination: For songs with vocals, lyrics is required (or enable lyrics_optimizer); for instrumental music, prompt is required. |
Content Moderation Failed | Check whether prompt / lyrics contain prohibited content, modify them, and retry. |
Rate Limit Triggered | Retry after reducing the request frequency. |
Server-Side Generation Failed | Retry. If the failure persists, contact technical support and provide the trace_id. |
lyrics_optimizer: true, and the system will automatically generate lyrics based on the prompt. If lyrics_optimizer is false and lyrics is not passed, requests to generate songs with vocals will fail, except in instrumental scenarios (when is_instrumental: true, no lyrics are required).url. Note that the link expires after 12 hours, so download and save it promptly.[Intro], [Verse], and [Chorus]) can significantly improve the structural integrity and listening experience of a song. Tags are not counted as lyrics characters.trace_id from the response. It is the task id of the request and can be used to locate specific issues in the generation pipeline.フィードバック