1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/lyria-3-pro";
const data = {
"prompt": "Create a 90-second uplifting indie folk-pop anthem about chasing the sunrise, in D major at 120 BPM, with fingerpicked acoustic guitar, layered vocal harmonies, warm bass, light hand claps and a soaring wide chorus.\n[Verse]\nWe left the city lights behind, chasing colors in the sky\n[Chorus]\nHold on, hold on, the morning's calling out our names\nWe're running toward the light, we'll never be the same"
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();Describe genre, BPM, key, instruments and mood; use [Verse] and [Chorus] tags or timestamps to shape structure. Paste your own lyrics or add 'instrumental only, no vocals' for backing tracks.
Optional array of up to 10 image URLs whose mood, colour and subject inspire the track. Leave empty for standard text-to-song generation.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Lyria 3 Pro is Google DeepMind's premier text-to-music model for generating full-length songs from a prompt. Unlike short-clip models, it composes complete tracks up to roughly three minutes with real structural awareness — distinct intros, verses, choruses, bridges and outros instead of one continuous loop. It reasons through musical structure before generating audio, which keeps energy progression and arrangement coherent from the first note to the last.
Output is high-fidelity 44.1 kHz stereo audio with sung vocals, timed lyrics and full instrumental arrangements. Lyria 3 Pro is also multimodal: alongside your text you can pass up to 10 reference images, and the model composes music inspired by their mood, colour and subject. Every track is embedded with Google's imperceptible SynthID watermark.
Lyria 3 Pro shines wherever polished, production-ready audio matters more than experimental songwriting. In testing, prompts packed with genre, key, BPM, instruments and structure tags returned clean, artifact-free stereo songs with coherent verse and chorus sections. Reach for it to score marketing videos and social content, build game and app soundtracks, produce podcast beds and background music, prototype soundtracks quickly, or turn a mood board of images into a matching track. Because the model is trained on licensed and permissible data and stamps every output with SynthID, it is a strong enterprise-safe choice for commercial work where copyright and provenance are concerns.
Be specific: name the genre, instruments, BPM, key and mood in one clear description. Use section tags or timestamps to define the song's arc, and paste your own lyrics when you want exact words — separating lyrics from your musical direction. Add "instrumental only, no vocals" for backing tracks, and state a target length (for example "a 90-second song") to shape duration. Prompt in the language you want the lyrics sung in. In our tests the model faithfully executes a detailed prompt, so prompt quality is the biggest lever on output; vague prompts produce safe, generic results.
How long can Lyria 3 Pro tracks be? Up to about three minutes, with duration influenced by your prompt or timestamps.
Does it generate vocals and lyrics? Yes. It sings expressive vocals and can use lyrics you provide or generate them from your prompt, in the prompt's language.
Can I generate instrumental-only music? Yes — add "instrumental only, no vocals" to your prompt for backing tracks and scores.
Can images guide the music? Yes. Provide up to 10 reference images and the model composes music inspired by their mood, colour and subject.
What audio quality does it output? High-fidelity 44.1 kHz stereo, delivered as an audio file with clean stereo separation.
Is the output watermarked? Yes. Every track carries Google's imperceptible SynthID watermark for identifying AI-generated audio.