Model Details
Lyria 2 is Google DeepMind's music generation model. Describe the music you want in a single text `prompt` — genre, mood, instrumentation, tempo — and it returns roughly 30 seconds of high-fidelity instrumental audio as a 48kHz WAV file. It is built for fast, prompt-driven scoring and ideation: the better you describe the style and the parts you want to hear, the closer the result lands.
## Best for - Short instrumental beds and soundtracks for video, ads, games, and presentations - Quickly auditioning a musical idea or style from a plain-language description - Background music in a specific genre or mood (e.g. "upbeat lo-fi hip hop with mellow keys", "tense cinematic strings") - Royalty-light placeholder tracks while prototyping
## Choose another model when - You need a full-length song or control over the exact duration — use a music model with a duration input - You need sung vocals or lyrics — Lyria 2 produces instrumental music only - You want speech or narration from text — use a text-to-speech model - You want sound effects or foley rather than music — use a sound-effects model
## Tips - Write the prompt like a music brief: name the genre, mood, key instruments, and tempo ("slow ambient pad with soft piano, 70 bpm, reflective") - Use `negative_prompt` to steer away from unwanted traits (e.g. "vocals, distortion, low quality"); it defaults to "low quality" - Set `seed` to an integer to reproduce a result you liked, or leave it unset for a fresh take each run
## Limitations - Output length is fixed at roughly 30 seconds; there is no duration control - Instrumental only — it will not generate vocals or lyrics
To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";
const result = await modelrunner.subscribe("google/lyria2", { input: { prompt: "Upbeat jazz piano trio with walking bass and light brushed drums", negative_prompt: "vocals, low quality", }, }); ```
