Skip to main content
Glama

music_generation

Generate AI music from text prompts and lyrics. Create custom audio tracks by describing style, mood, or scenes and providing song lyrics for musical composition.

Instructions

Create a music generation task using AI models. Generate music from prompt and lyrics.

COST WARNING: This tool makes an API call to Minimax which may incur costs. Only use when explicitly requested by the user.

Args:
    prompt (str): Music creation inspiration describing style, mood, scene, etc.
        Example: "Pop music, sad, suitable for rainy nights". Character range: [10, 300]
    lyrics (str): Song lyrics for music generation.
        Use newline (\n) to separate each line of lyrics. Supports lyric structure tags [Intro][Verse][Chorus][Bridge][Outro] 
        to enhance musicality. Character range: [10, 600] (each Chinese character, punctuation, and letter counts as 1 character)
    stream (bool, optional): Whether to enable streaming mode. Defaults to False
    sample_rate (int, optional): Sample rate of generated music. Values: [16000, 24000, 32000, 44100]
    bitrate (int, optional): Bitrate of generated music. Values: [32000, 64000, 128000, 256000]
    format (str, optional): Format of generated music. Values: ["mp3", "wav", "pcm"]. Defaults to "mp3"
    output_directory (str, optional): Directory to save the generated music file
    
Note: Currently supports generating music up to 1 minute in length.

Returns:
    Text content with the path to the generated music file or generation status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
lyricsYes
sample_rateNo
bitrateNo
formatNomp3
output_directoryNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swesmith-repos/MiniMax-AI__MiniMax-MCP.aa97ac39'

If you have feedback or need assistance with the MCP directory API, please join our Discord server