Skip to main content

Google Lyria integration

Powered by Google Lyria, this API generates original instrumental music tracks from text descriptions.
Google Lyria is an AI-powered music generation API that creates original instrumental music from text descriptions. Describe the genre, mood, instruments, and tempo you want, and receive an audio track delivered as a URL. Each request produces a single track with a fixed duration of 30 seconds, making it ideal for video production, games, podcasts, and multimedia projects.

Key capabilities

  • Text-guided generation: describe any music style to generate (e.g., “Uplifting orchestral score with soaring strings”, “Warm lo-fi hip hop beat with vinyl crackle”)
  • Fixed 30-second tracks: each request produces a single 30-second instrumental track
  • Negative prompt: exclude unwanted instruments, styles, or moods with negative_prompt
  • Reproducible output: pass a seed to get a consistent result for the same prompt
  • Audio URL output: the generated track is delivered via a URL for download
  • Async processing: webhook notifications or polling for task completion

Use cases

  • Video production: background music for videos and presentations
  • Game development: custom instrumental loops for games and apps
  • Content creation: unique music beds for podcasts, streams, and social media
  • Advertising: original background tracks for ads
  • Film production: temp tracks or production music for films

Generate music with Google Lyria

Submit a text description of the music you want to create. The service returns a task ID for async polling or webhook notification.

POST /v1/ai/music-generation/google-lyria

Create a new Google Lyria music generation task

GET /v1/ai/music-generation/google-lyria

List all Google Lyria tasks

GET /v1/ai/music-generation/google-lyria/{task-id}

Get task status and results by ID

Parameters

Prompt tips

For best results, include details about:
  • Genre: lo-fi hip hop, orchestral, synthwave, acoustic folk, etc.
  • Mood: uplifting, melancholic, energetic, relaxed
  • Instruments: piano, strings, electric guitar, 808 drums, etc.
  • Tempo: slow tempo, upbeat, driving rhythm
Example prompts:
  • “Uplifting orchestral score with soaring strings and triumphant brass”
  • “Warm lo-fi hip hop beat with vinyl crackle and mellow keys”
  • “Energetic synthwave track with driving bass and retro leads”
  • “Peaceful acoustic folk with fingerpicked guitar and soft strings”

Frequently Asked Questions

Google Lyria is an AI-powered text-to-music API. You submit a text description of the music you want (genre, mood, instruments, tempo), receive a task ID immediately, then poll for results or receive a webhook notification. Each request returns a single 30-second instrumental track delivered via a URL.
Every Google Lyria request produces a single track with a fixed duration of 30 seconds. There is no duration parameter.
Google Lyria returns an audio track delivered via a URL that remains accessible for download after task completion.
Pass the same seed together with the same prompt. Identical inputs return a consistent result across requests. Omit seed to get a random seed on each request.
Use negative_prompt to describe elements to avoid, such as unwanted instruments, styles, or moods (for example "vocals, distortion, harsh percussion").
Rate limits vary by subscription tier. See Rate Limits for current limits.
See the Pricing page for current rates and subscription options.

Best practices

  • Prompt specificity: use detailed descriptions of genre, mood, instruments, and tempo for better accuracy
  • Negative prompts: exclude unwanted elements to steer the composition
  • Reproducibility: fix seed to compare prompt variations against a stable baseline
  • Production integration: use webhooks instead of polling for scalable applications
  • Error handling: implement retry logic with exponential backoff for 503 errors
  • Lyria 3: text-to-music with selectable clip or pro model variants and optional reference images. See the Lyria 3 overview.
  • ElevenLabs Music: generate 10-240 second music tracks from text
  • Sound Effects: generate sound effects from text descriptions
  • Audio Isolation: isolate specific sounds from audio files