Generate Music
generate_musicUse this to create an AI music track (full songs with vocals, or instrumentals). Models: music-3.0 (default, 200 credits — songs from a prompt and/or lyrics, lyrics optimizer on by default so a prompt alone works), eleven-music-v2.5 (ElevenLabs' newest — songs with vocals in many languages, sung from the user's lyrics exactly as written or its own, or instrumentals, of an EXACT length via duration, 10–300 s — 200 credits per minute billed per second, 10-second minimum; the prompt must not name artists, songs, albums or record labels), mureka-v9.5 (200 credits — Mureka's newest: sings the user's EXACT lyrics verbatim, or instrumental/BGM), mureka-v9 (60 credits — sings the user's EXACT lyrics verbatim, or instrumental/BGM), lyria-3 (100 credits — high-fidelity from a rich prompt, can condition on up to 10 reference images), and sonilo-music (instrumental/background music of an EXACT length via duration, 5–360 s — priced PER SECOND at 4 credits/s with a 10-second minimum, no vocals). VIDEO-TO-MUSIC: pass a video URL (upload_media first for local files) and sonilo-video-music composes a licensed soundtrack for the clip's content, pacing and mood — priced per second of the video's measured length (15 credits/s, 10 s minimum, ≤360 s). Flat price per track (by length for sonilo-music, eleven-music-v2.5 and sonilo-video-music), charged on success only; each call starts a new paid job. Submits an async job and returns a numeric job_id — music takes a minute or three: poll check_generation_status with the job_id AND type "music" every 15–30 seconds, then share the finished track's listen/download link with the user (chat can't embed audio players).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "generate_music"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Music model id. Omit for the default (music-3.0 — latest MiniMax, all-purpose songs, 200 credits; passing a video auto-selects sonilo-video-music). Alternatives: eleven-music-v2.5 (ElevenLabs — songs with vocals in many languages or instrumentals of an exact length, 200 credits per minute billed per second — pass duration), music-2.6 (previous generation, same price), mureka-v9.5 (Mureka's newest — sings exact lyrics, 200), mureka-v9 (sings exact lyrics, cheapest at 60), lyria-3 (high-fidelity, image conditioning, 100), sonilo-music (instrumental/background music of an exact length, priced per second — pass duration). Call list_models for details. | |
| video | No | Video-to-music: URL of a video (≤360 s, ≤30 MB for public URLs) to compose a licensed soundtrack FOR — the music follows the clip's content, pacing and mood, and matches its length. Must be a URL — upload local files with upload_media first. Uses sonilo-video-music: 15 credits per second of the video's measured duration (10-second minimum). prompt becomes optional direction (genre/mood/instrumentation); no lyrics or duration. | |
| format | No | music-2.6/music-3.0 only: output audio format, wav (default) or mp3. | |
| images | No | lyria-3 only: up to 10 reference images to condition the mood — each a URL, data URI, or raw base64 (upload local files with upload_media). | |
| lyrics | No | Lyrics to sing. mureka-v9.5 and mureka-v9 sing them VERBATIM ([verse]/[chorus] tags supported); music-2.6/music-3.0 polish them unless lyrics_optimizer is false; lyria-3 treats them as optional guidance; eleven-music-v2.5 sings them exactly as written (optional, up to 3000 chars and 4090 together with the prompt; omit them and it writes its own; not with instrumental). | |
| prompt | No | Style/mood description of the track. Required for lyria-3 (10–2000 chars), eleven-music-v2.5 (up to 2000 chars) and for instrumental tracks; optional on music-2.6/music-3.0 when lyrics are given. eleven-music-v2.5 refuses prompts that name artists, songs, albums or record labels or quote a real song's lyrics (refused jobs are free). | |
| duration | No | Track length in seconds, for the two models priced by length: sonilo-music (5–360, default 30; 4 credits/s → 30 s = 120 credits) and eleven-music-v2.5 (10–300, default 60; 200 credits per minute billed per second → 30 s = 100, 60 s = 200, 5 min = 1000 credits). Both have a 10-second billing minimum. Other music models ignore length (sonilo-video-music sizes the music to the video). | |
| instrumental | No | Generate an instrumental track (no vocals). music-2.6/music-3.0, mureka-v9.5/mureka-v9 (mureka requires a prompt in this mode) and eleven-music-v2.5 (not together with lyrics). | |
| vocal_gender | No | mureka-v9.5 and mureka-v9 only: preferred vocal gender for songs (default auto). | |
| lyrics_optimizer | No | music-2.6/music-3.0 only. Write/polish lyrics from the prompt — DEFAULT TRUE (matches web/API). Set false to sing the provided lyrics as-is. |