Generate Music
beatra.music.generateGenerate songs or instrumentals from a prompt, lyrics, or reference audio; optionally set a target length in seconds, reuse a saved persona, or score from reference images, a video, or audio. Make lyric timing, cover art, a visualizer MP4, or a WAV for a chosen track afterwards with beatra.music.edit. This billable call consumes Beatra credits and creates an asynchronous task. Submit exactly once, then poll with beatra.tasks.get. Reuse the same client_request_id only for an identical retry.
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": {
"prompt": "<prompt>",
"client_request_id": "<client_request_id>"
},
"name": "beatra.music.generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Omit unless the user requests a model. | auto |
| title | No | ||
| lyrics | No | Optional lyrics text. Must be omitted for instrumental music. | |
| prompt | Yes | Style, mood, genre, and instrumentation. When lyrics are supplied (or Suno custom mode is on) this maps to the provider's style-conditioning field; otherwise it is the song description the model writes the song from. Either way it is not an instruction field: execution directives written here (for example "do not omit anything", "sing it verbatim", "make chapter three differ from chapter one") are not read as instructions and will not be obeyed. Put the words to be sung in `lyrics`, or set `instrumental` to true for a track with no vocals. | |
| persona_id | No | A singer from beatra.music.personas.list (saved from a song or created from the user's own voice); the new song keeps that singer's voice and style. | |
| references | No | Score from images (up to 5), one video (up to 241 seconds), or audio clips. Not combinable with duration_seconds, persona_id, lyrics, or reference_audio. | |
| duration_fit | No | approx keeps the generated length; exact trims to the target with a short fade-out. Only with duration_seconds. | |
| instrumental | No | When true, generate instrumental music without vocals. | |
| model_options | No | Options grouped by public music model family. | |
| reference_audio | No | ||
| duration_seconds | No | Target length in seconds (10–360). Results of 30 seconds or longer land within about 10%; shorter targets are generated at 30 seconds and trimmed. Not combinable with references or reference_audio. | |
| client_request_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | ||
| error | No | ||
| usage | No | ||
| status | No | ||
| billing | No | ||
| task_id | No | ||
| terminal | No | ||
| artifacts | No | ||
| resolved_model | No |