Skip to main content
Lyria Music Generation
Use a MixRoute API key and the exact model ID in the request path. This guide describes MixRoute’s GenerateContent request format. POST /v1/models/lyria-3.5:generateContent

Model ID

  • lyria-3.5

Request and response

Lyria accepts a music prompt, not speech synthesis instructions. For this model put lyria-3.5 in the URL and submit contents[].parts[].text. Describe instruments, vocals, style and desired duration in the prompt; duration is not a fixed seconds field.
Read candidates[].content.parts[].inlineData.data for Base64 audio and inspect mimeType before saving. A response without audio is not a successfully generated track. Availability and supported fields depend on your MixRoute route. Check the model page before assuming that streaming or a different request format is available.

Interactions API

POST /v1beta/interactions Use the Interactions payload below, not the GenerateContent contents body. Check that the response contains audio data before saving it.