lyria

Generate and validate music with Google Lyria 3 through the Gemini Interactions API.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/zamansepeti43/c-rak-agent --skill lyria-zamansepeti43
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lyria
Source: https://github.com/zamansepeti43/c-rak-agent/tree/main/video-engine/.agents/skills/lyria
Command: npx skills add https://github.com/zamansepeti43/c-rak-agent --skill lyria-zamansepeti43

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Music generation with Google Lyria 3 is stochastic, billed per request, and its returned duration metadata is unreliable, so unplanned calls waste budget and produce tracks that fail video synchronization or vocal requirements. ## Core Features & Use Cases - Model Selection Guidance: Choose deliberately between lyria-3-clip-preview (30-second MP3 loops), lyria-3-pro-preview (full songs with vocals), and lyria-realtime-exp (WebSocket steering), while surfacing the OpenMontage google_music adapter's limitation to Pro only. - Structured Prompt Contracts: Build prompts covering purpose, genre, tempo, instrumentation, timestamped structure, vocal policy, and exclusions, including instrumental-only constraints and custom lyrics blocks. - Output Verification Workflow: Probe generated files with ffprobe, audition vocals and synchronization points, preserve the provider source, and derive a separate exact-duration production master when needed. - Use Case: When scoring a 30-second video, confirm the brief, announce the model and per-request cost, write one timestamped underscore prompt, make a single approved generation call, then probe and audition the MP3 before recording approval metadata. ## Quick Start Use the lyria skill to design a Lyria 3 Pro prompt for a 60-second instrumental video underscore and verify the generated audio duration with ffprobe.

Frequently Asked Questions about lyria

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate music with Google Lyria 3?

Call the Gemini Interactions API with a structured prompt specifying purpose, genre, tempo, instrumentation, structure, and vocal policy. Use lyria-3-clip-preview for 30-second clips at $0.04 per request or lyria-3-pro-preview for full songs at $0.08 per request.

What is the difference between Lyria 3 Clip, Pro, and RealTime?

Clip always generates a 30-second MP3 for previews and loops, Pro produces prompt-influenced songs up to roughly three minutes with vocals, and RealTime is an experimental WebSocket model for continuously steered instrumental performance. RealTime does not route through the OpenMontage google_music adapter.

Does Lyria 3 generate exact-duration audio for video?

No, Pro duration is influenced by prompt timestamps, not an exact API parameter, and adapter-reported duration is the request value. Probe the file with ffprobe, preserve the source, and derive a separate trimmed master with a short fade for exact durations.

How do I get instrumental-only output from Lyria 3?

State an explicit exclusion list in the prompt: no lead or backing vocals, speech, choir, humming, vocal chops, spoken samples, lyrical fragments, or recognizable quotations. Audition the result afterward, since accidental vocals are a stochastic adherence failure requiring a new paid generation.

Why does Lyria 3 return 403 or API_KEY_SERVICE_BLOCKED errors?

These indicate authentication or Google project configuration failures, not prompt-quality problems. Stop retrying, verify the credential path without printing keys, and note that GOOGLE_API_KEY takes precedence over GEMINI_API_KEY in the OpenMontage resolver.

Can Lyria 3 generate music from images?

Yes, the underlying API accepts up to 10 base64-encoded images, while the OpenMontage adapter accepts one image path or URL. Prompt explicitly for the musical interpretation, mapping palette to timbre and motion to rhythm.