Use this API to generate a song from lyrics and a prompt.
HTTP: Bearer Auth
Bearer API_key, can be found in Account Management>API Keys.The media type of the request body. Must be set to application/json to ensure the data is sent in JSON format.
application/json The model name. Options: music-2.5+ (recommended) or music-2.5.
music-2.5+, music-2.5 A description of the music, specifying style, mood, and scenario.
For example: "Pop, melancholic, perfect for a rainy night".
Note:
music-2.5+ with is_instrumental: true: Required. Length: 1–2000 characters.music-2.5 / music-2.5+ (non-instrumental): Optional. Length: 0–2000 characters.2000Song lyrics, using \n to separate lines. Supports structure tags: [Intro], [Verse], [Pre Chorus], [Chorus], [Interlude], [Bridge], [Outro], [Post Chorus], [Transition], [Break], [Hook], [Build Up], [Inst], [Solo].
Note:
music-2.5+ with is_instrumental: true: Not required.music-2.5 / music-2.5+ (non-instrumental): Required. Length: 1–3500 characters.lyrics_optimizer: true and lyrics is empty, the system will auto-generate lyrics from prompt.1 - 3500Whether to use streaming output.
The output format of the audio. Options: url or hex.
When stream is true, only hex is supported.
⚠️ Note: url links expire after 24 hours, so download promptly.
url, hex Audio output configuration
Whether to automatically generate lyrics based on the prompt description. Only supported on music-2.5 and music-2.5+.
When set to true and lyrics is empty, the system will automatically generate lyrics from the prompt. Default: false.
Whether to generate instrumental music (no vocals). Only supported on music-2.5+.
When set to true, the lyrics field is not required. Default: false.