Lyria 3.5 API Review 2027 for AI Music Builders
Build one Lyria 3.5 API music workflow, handling multimodal input, asynchronous output, lyrics, audio files, errors, and safeguards.

A music request is easy to submit. The harder part is deciding whether the returned base64 block is complete, whether the lyrics match it, and whether a timeout already created a billable song.
Dora. This Lyria 3.5 API review follows one full-song request from prompt to validated file. I did not run a paid request, so this is a reproducible integration path rather than a listening test.
Confirm the Current API Surface
Model ID, Access, and Supported Inputs
The current Lyria model ID is lyria-3.5. Google lists it as a preview model for full songs with verses, choruses, and bridges. It accepts text and up to ten images, then returns 44.1 kHz stereo audio plus text containing lyrics and song information.

The official model page lists a 131,072-token input limit. Lyria does not support function calling, structured outputs, caching, Batch API, Live API, or URL context.
Use the Interactions API for a new Lyria API integration. Google recommends it for new projects; generateContent remains supported but is now legacy. No dated, immutable snapshot is published. Log the model ID, API version, SDK version, request time, and response ID.
Choose One Full-Song Generation Task
Use one measurable brief:
Create a two-minute indie-pop song in G major at 112 BPM. Use acoustic guitar, restrained drums, and warm alto vocals. Structure: intro, verse, chorus, second verse, chorus, bridge, and outro. The lyrics describe leaving a noisy city for a quiet coastal town. Do not imitate a named artist.
Accept the result only when:
- The MP3 decodes and plays
- It contains 44.1 kHz stereo audio
- Duration falls between 100 and 140 seconds
- Requested sections are present
- Lyrics match the subject
- No protected lyrics or named-artist imitation appears
Google’s music-generation guide says prompts can influence duration, but outputs remain nondeterministic.
Submit and Parse the Request
Send Text or Image Input Securely

Keep GEMINI_API_KEY in a server-side secret store or environment variable. Never embed it in browser code, mobile bundles, or source control.
import base64, os
from pathlib import Path
from google import genai
client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
result = client.interactions.create(
model="lyria-3.5",
input=(
"Create a two-minute indie-pop song in G major at 112 BPM. "
"Use acoustic guitar, restrained drums, warm alto vocals, "
"and an intro, two verses, chorus, bridge, and outro."
),
store=False,
)
if result.status != "completed" or not result.output_audio:
raise RuntimeError(f"Generation failed: {result.status}")
Path("song.mp3").write_bytes(
base64.b64decode(result.output_audio.data, validate=True)
)
Path("song.txt").write_text(result.output_text or "", encoding="utf-8")
store=False avoids default Interaction retention. For image-conditioned generation, send owned image bytes as an inline block beside the text. Remove unnecessary EXIF data before upload.
Save Audio, Lyrics, and Song Structure
Responses contain a sequence of steps. Relevant model_output steps can include audio and text blocks. Convenience properties expose the final audio and text, but saving the raw response helps diagnose parser failures.
Do not assume the text is stable JSON. Structured output is unsupported. Store it first, then parse section labels such as [Verse] and [Chorus] with application-owned code.
Record the interaction ID, request hash, prompt version, audio checksum, model ID, latency, status, and billed cost. The request hash also helps identify accidental duplicates.
Prepare the Integration for Production
Validate Files, Timeouts, and Failures
Successful base64 decoding does not prove that the audio is usable. Inspect it with ffprobe or another media parser. Verify format, sample rate, channel count, duration, and a nonzero audio stream before storage.
Retry only transient 408, 429, and 5xx errors. Use exponential backoff, jitter, and a fixed retry ceiling. Do not retry 400 or 403 without changing the request or credentials.
No public idempotency contract exists. After an ambiguous timeout, check local request state before trying again. A blind retry can generate two songs. That is a small implementation detail until the invoice arrives.
Apply Safety, Rights, and Budget Controls

Current pricing lists Lyria 3.5 at $0.08 per song/request, with no free tier. Track every attempt, accepted song, rejected result, and retry. Cost per accepted song matters more than the advertised request price.
Prompts pass through safety filters. Requests for a specific artist’s voice or copyrighted lyrics may be blocked. Every generated track includes an imperceptible SynthID watermark.
The Gemini API terms say Google does not claim ownership of generated content. Developers remain responsible for input rights, lawful use, attribution requirements, and output review.
Limits and Trade-Offs
Preview Interfaces Can Change
lyria-3.5 is still a preview identifier. There is no dated snapshot, Batch API, or priority-inference option. Pin the SDK version and keep the response parser tolerant of unknown blocks.
Run a contract test before releases. First verify that the expected audio and text fields still arrive. Musical evaluation comes afterward.
Music Outputs Need Product-Level Review
Structural coherence does not establish originality, pronunciation, lyric quality, mix balance, or commercial suitability. Review the complete track, not only the chorus.
Lyria 3.5 also lacks multi-turn music editing. A revision is another generation rather than an edit to the existing waveform. For music app development, this affects both UX and cost.
FAQ

Does Lyria 3.5 Support Idempotency Keys?
No idempotency header or request field is publicly documented. Use request hashes, database states, and duplicate checks before retrying.
What Is the Maximum Request Rate?
Google publishes no fixed Lyria limit. Quotas vary by project, model, billing tier, and account status. View current RPM and daily limits in AI Studio. Limits apply per project, not per key.
Can Generated Audio Be Streamed Incrementally?
Not through the documented Lyria 3.5 workflow. It returns complete base64 audio and does not support Live API. Google directs streaming use cases to Lyria RealTime.
Are Failed Music Requests Billed?
Google’s general billing guide says 400 and 500 failures are not billed for consumed tokens, though they count against quota. No Lyria-specific rule covers every timeout or cancellation. Check billing records after ambiguous failures.
Can API Outputs Be Stored in Google Cloud Automatically?
Not by the generation request. Decode the audio, then upload it with the Cloud Storage SDK and a service account. Interaction retention is not a Cloud Storage archive.
Conclusion
The Lyria 3.5 API provides a short path from text or images to full-song audio and lyrics. Its production boundaries are clear: preview status, no idempotency key, no structured output, and no incremental streaming. Validate the request lifecycle first. Then decide whether the music is worth keeping.
Previous posts:





