curl --request POST \
--url https://api.omniall.ai/v1beta/models/{model}:generateContent \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Create a 30-second cheerful acoustic folk song with guitar and harmonica."
}
]
}
],
"generationConfig": {
"responseModalities": [
"AUDIO",
"TEXT"
]
}
}
'{
"candidates": [
{
"content": {
"parts": [
{
"text": "[Verse]\nCity lights..."
},
{
"inlineData": {
"mimeType": "audio/mpeg",
"data": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2..."
}
}
]
}
}
]
}Google Lyria
Google native format
Generate music with Google Lyria using Gemini generateContent.
Path: POST https://api.omniall.ai/v1beta/models/{model}:generateContent
Text-to-music or image-to-music. Response parts may include lyrics (text) and audio (inlineData Base64 MP3).
Auth: Authorization: Bearer sk-...
POST
/
v1beta
/
models
/
{model}
:generateContent
curl --request POST \
--url https://api.omniall.ai/v1beta/models/{model}:generateContent \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Create a 30-second cheerful acoustic folk song with guitar and harmonica."
}
]
}
],
"generationConfig": {
"responseModalities": [
"AUDIO",
"TEXT"
]
}
}
'{
"candidates": [
{
"content": {
"parts": [
{
"text": "[Verse]\nCity lights..."
},
{
"inlineData": {
"mimeType": "audio/mpeg",
"data": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2..."
}
}
]
}
}
]
}Headers
Bearer API key.
Example:
"Bearer sk-..."
Path Parameters
Lyria model id. Examples: lyria-3.5 (full song), lyria-3-clip-preview (~30s clip).
Example:
"lyria-3.5"
Body
application/json
Response
200 - application/json
Music + optional lyrics