Skip to content
Google logo

Lyria 3 Pro

Music Generation • Google

Model ID

Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.

Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.

  • Third-party

Google's Lyria 3 Pro model generates full-length MP3 songs from detailed text prompts and optional image prompts.

Model Info
More informationlink ↗
Pricing
  • Per track$0.08

Usage

const response = await env.AI.run(
  'google/lyria-3-pro',
  {
    prompt:
      'A cinematic folk song about finding home, with acoustic guitar, intimate vocals, brushed drums, and a soaring final chorus',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "google/lyria-3-pro",
  "input": {
    "prompt": "A cinematic folk song about finding home, with acoustic guitar, intimate vocals, brushed drums, and a soaring final chorus"
  }
}'
{
  "state": "Completed",
  "result": {
    "audio": "https://examples.aig.cloudflare.com/google/lyria-3-pro/cinematic-folk-song.mp3"
  }
}

Parameters

prompt
stringrequiredminLength: 1maxLength: 5000
image
stringminLength: 1Base64-encoded image used as visual inspiration
audio
stringGenerated music as an audio URL

API Schemas (Raw)

Input
Output

Was this helpful?