Text To Music
text_to_musicGenerate music from text description and lyrics.
Creates music tracks from text prompts with customizable parameters including tempo, key, time signature, and optional style reference audio.
IMPORTANT: Check model specifications using get_available_models() before calling. Pay attention to model limits for duration, inference_steps, guidance_scale, and bpm.
Available models:
MiniMaxMusic3_11B_INT8: steps=30 (fixed), guidance=1.7 (fixed), duration=20-300s, bpm=30-30, caption=3-2000 chars, ref_audio=0s (fixed)AceStep_1_5_XL_Turbo_INT8: steps=8 (fixed), guidance=1 (fixed), duration=10-300s, bpm=50-200, caption=3-300 chars, ref_audio=5-60sAceStep_1_5_Turbo: steps=8 (fixed), guidance=1 (fixed), duration=10-300s, bpm=50-200, caption=3-300 chars, ref_audio=5-60s
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": {
"caption": "<caption>",
"model": "<model>",
"lyrics": "<lyrics>",
"duration": "<duration>"
},
"name": "text_to_music"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bpm | No | Beats per minute (optional). Bounds per model ('bpm' in the model list) | |
| seed | No | Random seed (-1 for random) | |
| model | Yes | Music generation model name (must support txt2music inference type) | |
| lyrics | Yes | Song lyrics (max 10000 chars). Use '[Instrumental]' for no vocals | |
| caption | Yes | Text description of the music to generate. Length bounds per model ('caption' in the model list) | |
| duration | Yes | Audio duration in seconds. Bounds per model ('duration' in the model list) | |
| keyscale | No | Musical key/scale, e.g. 'C major', 'F# minor' (optional) | |
| webhook_url | No | HTTPS URL for deAPI to call when this job finishes. Notifies your own systems; the tool still returns the result here | |
| audio_format | No | Output format, e.g. 'mp3' or 'flac'. Per-model — see info.limits.output_formats; leave unset for the model's own default | |
| timesignature | No | Time signature: 2, 3, 4, or 6 (optional) | |
| guidance_scale | No | Guidance scale. Leave unset when the model fixes it (see 'guidance' in the model list) | |
| vocal_language | No | Vocal language code, e.g. 'en', 'es' (optional) | |
| webhook_secret | No | 32-255 char key deAPI signs the callback with (HMAC-SHA256). Needs webhook_url. A secret given in chat stays in the transcript | |
| inference_steps | No | Number of inference steps. Leave unset when the model fixes it (see 'steps' in the model list) | |
| reference_audio | No | Reference audio for style transfer (URL, data URI, or base64). Its length must be within the model's window ('ref_audio' in the model list, e.g. 5-60s) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||