Start a song
generate_musicStart music generation with a Kunavo audio model; the request charges your balance and returns a task ID to follow with get_task.
Instructions
Start generating music with a Kunavo music model (endpoint audio_music in list_models). Spends the balance: one request is charged (its listed price is in list_models) and makes two tracks. What was charged is what get_usage reports. A song takes one to three minutes, so this returns a task id; follow it with get_task. Starting it twice makes and charges two requests, unless the second call carries the first one's idempotency_key.
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>",
"prompt": "<prompt>"
},
"name": "generate_music"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | A model id from list_models with endpoint audio_music. | |
| style | No | Style or genre, e.g. "lofi, jazz, chill". | |
| title | No | Track title. | |
| prompt | Yes | A description of the track. With custom_mode it is the lyrics instead, and the arrangement comes from style. | |
| custom_mode | No | Treat prompt as lyrics and take the arrangement from style. | |
| instrumental | No | No vocals. | |
| wait_seconds | No | How long to wait for the result before returning, in seconds (0 to 45, default 0). An unfinished task is returned with its id. | |
| idempotency_key | No | Any string of your own, 128 characters at most. Calling again with the same one and the same arguments returns the task that call started instead of starting, and charging, another. A key stands for one request for as long as the API keeps its task: the API refuses it for a request on another tool, for another model or with other arguments, so use a new one for each new request. When left out, one is made and given back in the answer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task id: img_… (image), vid_… (video) or msc_… (music). | |
| kind | Yes | ||
| urls | Yes | Result files once completed: the images, the video, or the audio of each track. | |
| error | Yes | ||
| model | Yes | ||
| status | Yes | queued, in_progress, completed or failed. Anything else is a task that is not finished. | |
| tracks | No | Music only: one entry for each track. | |
| stalled | Yes | true when the task has gone longer than expected without finishing. | |
| archived | Yes | true: every URL in `urls` is Kunavo's own copy and does not expire. false: a file could not be archived and its URL is the model provider's temporary one. null until completed. | |
| next_step | Yes | What to do with this result. | |
| created_at | Yes | ||
| resolution | No | Video only. | |
| completed_at | Yes | ||
| pollable_until | Yes | The task can be read with get_task at least until then. | |
| idempotency_key | No | The key this task was started under, in the answer of the tool that started it (get_task does not know it). Calling that tool again with it and the same arguments returns this task. | |
| duration_seconds | No | Video only. |