Skip to content

Music Generation

Google Lyria models produce short music clips. Use the /v1/audio/music endpoint.

Terminal window
curl https://llmtr.com/v1/audio/music \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "google/lyria-3-clip-preview",
"input": "Create a short upbeat synth intro with light percussion.",
"max_budget_usd": 0.08
}'
{
"id": "music_xxx",
"status": "succeeded",
"url": "https://storage.llmtr.com/music/xxx.mp3",
"duration_seconds": 15,
"usage": {
"seconds_generated": 15,
"native_cost_usd": 0.06
}
}

| Field | Description | |---|---| | duration_seconds | Output length (typically 15-60) | | tempo_bpm | Optional BPM | | key | Optional musical key (C major, A minor ...) |

Billed per song or per second of audio by native unit (see the model card).