Generate Music
generate_musicGenerate a music track (modelId from list_models kind "music", e.g. elevenlabs-music; durationSec 5–300; prompt 3–2000 chars; optional instrumental, lyrics). Waits up to ~90 s and returns { trackId, audioUrl, costCents, billingMode } when ready. If audioUrl is empty the track is still rendering: poll get_job with jobId = trackId every ~15 s until it succeeds or fails (gives up at 30 min). Scope required: generate:music.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"modelId": "<modelId>",
"prompt": "<prompt>",
"durationSec": "<durationSec>"
},
"name": "generate_music"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Genre/mood tags. Suno uses them as the style; fal models (e.g. lyria-2) add them to the prompt; ElevenLabs ignores them. | |
| lyrics | No | Custom lyrics for Suno models; tags (or else the prompt) then set the style. Ignored by other models. | |
| prompt | Yes | What the track should sound like (3–2000 characters). | |
| modelId | Yes | Music model id from list_models (kind music), e.g. elevenlabs-music. Other kinds are refused. | |
| durationSec | Yes | Track length in seconds (5–300); must not exceed the model's maxDurationSec in list_models. | |
| instrumental | No | No vocals. Honoured by ElevenLabs and Suno models; ignored by fal models. |