generate_music
COSTS CREDITS from the user's wallet. State the price (from estimate_credits) and get the user's confirmation before calling. Generates a song, a sound effect (type "sound_effect") or a spoken voice-over with music (type "speech"). Returns immediately with a generationId; poll get_generation for results.
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": {
"model": "<model>",
"idempotencyKey": "<idempotencyKey>"
},
"name": "generate_music"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | For song and speech: simple = describe it; custom = write the lyrics / exact script yourself. Not needed for type sound_effect (mode "sound_effect" without type is also accepted). | |
| type | No | song = a song with music; sound_effect = a short sound effect / loop; speech = spoken voice-over / narration with optional background music (not singing). See list_models[].types. | song |
| model | Yes | Model id from list_models (e.g. "suno", "acestep"). | |
| params | No | Parameters for the chosen type + mode: list_models[].params[mode] for songs, list_models[].params.sound_effect for sound effects, list_models[].speech.params[mode] for speech. Unknown keys are rejected. | |
| version | No | Version id from list_models; omit for the model's default version. | |
| idempotencyKey | Yes | 8-64 chars [A-Za-z0-9._:-]. Stable per logical request: resend the same key + same params after a timeout to get the existing result instead of paying twice. Use a new key when anything changes. |