Generate music with Lyria 3

Lyria 3 is Google's family of music generation models, available through the Gemini API. With Lyria 3, you can generate high-quality, 44.1 kHz stereo audio from text prompts or from images. These models deliver structural coherence, including vocals, timed lyrics, and full instrumental arrangements.

The Lyria 3 family includes two models:

Model Model ID Best for Duration Output
Lyria 3 Clip lyria-3-clip-preview Short clips, loops, previews 30 seconds MP3
Lyria 3 Pro lyria-3-pro-preview Full-length songs with verses, choruses, bridges A couple of minutes (controllable using prompt) MP3

Both models can be used using the new Interactions API, supporting multimodal inputs (text and images), and produce 44.1 kHz high-fidelity stereo audio.

Generate a music clip

The Lyria 3 Clip model always generates a 30-second clip. To generate a clip, call the interactions.create method with a text prompt. The response always includes the generated lyrics and song structure alongside the audio in the steps schema.

Python

import base64
from google import genai

client = genai.Client()

interaction = client.interactions.