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, or a sound effect with mode "sound_effect". Returns immediately with a generationId; poll get_generation for results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | simple = describe the song; custom = write lyrics/style yourself; sound_effect = a short sound effect / loop instead of a song. See list_models[].modes. | |
| model | Yes | Model id from list_models (e.g. "suno", "acestep"). | |
| params | No | Mode-specific parameters; schema in list_models[].params[mode]. 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. |