Lyria 3 Pro API: How to Generate Music Programmatically (2026 Guide)
Jul 27, 2026

Lyria 3 Pro API: How to Generate Music Programmatically (2026 Guide)

Lyria 3 Pro API guide: which surface to use (AI Studio, Gemini API, Vertex AI), what it returns (48kHz stereo, up to 3 min), the prompt formula, and pricing.

You found Google's Lyria 3 Pro, you want to call it from your own code, and then you hit the wall every developer hits: is the Lyria 3 Pro API in Google AI Studio, the Gemini API, or Vertex AI? Are those three different things or the same thing wearing different logos? What does a request even return — a URL, raw bytes, a base64 blob? And how much will a thousand songs cost when there's no single published price?

Most docs answer exactly one of those questions, on exactly one surface, with a copy-paste snippet and no map of the alternatives. That leaves you guessing whether you picked the right entry point before you've written a line of code.

This guide is the map. It covers the three official developer surfaces for Lyria 3 Pro, what the model actually accepts and returns, a decision table for picking a surface, the prompt structure that controls full song sections, and an honest read on pricing while the model is in preview. Code is kept conceptual on purpose — Google's exact endpoints and model IDs change during preview, so the definitive request shape always lives in Google's music-generation docs. We built a production Lyria 3 Pro pipeline behind this site's generator, so the trade-offs below come from wiring it up, not from the marketing pages.

What the Lyria 3 Pro API Actually Gives You

Before choosing a surface, know the contract. These specs are the same regardless of which of the three you call, because they belong to the model itself (per Google DeepMind's model card and the Vertex AI docs):

AspectLyria 3 Pro
Output audioHigh-fidelity stereo, 48 kHz
Max track lengthFull song up to 3 minutes in one generation
Song structureIntros, verses, choruses, bridges from the prompt
VocalsAI-generated vocals and lyrics in 8 languages
Text inputsPrompt, your own lyrics
File inputsReference images (up to 10) and PDF
Not supportedAudio upload, voice cloning, stem export
ProvenanceSynthID watermark on every output; C2PA credentials

The 8 vocal languages are English, German, Spanish, French, Hindi, Japanese, Korean, and Portuguese. Two facts matter most for how you design a request: there is no audio input (you cannot send a melody or an existing track to continue), and a Pro request returns a complete song in a single call rather than streaming 30-second chunks you stitch together.

If you only need short clips or want to prototype cheaply, the base Lyria 3 model caps at 30 seconds — useful for testing a genre and vocal direction before you spend a Pro generation. More on that split on our Lyria 3 overview.

The Three Official API Surfaces

Google exposes Lyria 3 Pro to developers through three surfaces that share the model but differ in audience, setup, and controls.

SurfaceBest forSetup weightAccess model
Google AI StudioPrototyping, testing prompts in a UI, grabbing starter codeLightest — sign in, get an API keyPay-per-generation
Gemini APIShipping Lyria into your own app or backendLight — API key, standard SDKPay-per-generation
Vertex AIEnterprise scale, governance, Media StudioHeaviest — Google Cloud project, IAM, billingPublic preview, API + Media Studio

The mental model: AI Studio is where you experiment, the Gemini API is where you build, and Vertex AI is where you scale with enterprise controls. AI Studio and the Gemini API are two faces of the same developer stack — you typically prototype a prompt in AI Studio, copy the generated code, then call the Gemini API from your service. Vertex AI is the separate, Cloud-native path with IAM, VPC controls, regional endpoints, and a visual Media Studio, and it is the surface where Google labels Lyria 3 Pro public preview — meaning specs and rates can still change.

One disambiguation, because it trips up developers: Lyria RealTime is not Lyria 3 Pro. RealTime is a separate, interactive, instrumental-only model that streams continuous audio for live control (key, tempo, density, brightness) — great for interactive apps, not for rendering a finished vocal song. If you need a full structured track with vocals, you want Lyria 3 Pro; if you need a live, steerable instrumental stream, that's a different endpoint.

Which Surface Should You Use?

Match the surface to what you're actually building.

  • Just exploring, or building a demo? Start in Google AI Studio. You get a key in minutes, can hear results in the UI, and it hands you starter code you can lift into a script.
  • Building a product feature (a "generate a track" button in your app)? Call the Gemini API directly. It's the least-friction way to go from key to production without standing up a Cloud project.
  • Enterprise workload — you need audit logging, IAM roles, data-residency, quota management, or a non-technical team using Media Studio? Go Vertex AI, and plan for the Google Cloud setup that comes with it.

Rule of thumb: prototype in AI Studio, ship on the Gemini API, and only move to Vertex AI when compliance or scale forces it. Don't pay the Google Cloud setup tax for a side project, and don't ship an enterprise product on a bare API key with no governance.

If you don't want to manage any Google surface at all — no API key rotation, no Cloud project, no per-request billing plumbing — a credit-based studio wraps Lyria 3 Pro behind a single generator so you can create a track from one prompt box and skip the account setup entirely.

What a Request Looks Like (Conceptually)

Every surface follows the same request shape. Rather than fabricate an exact payload or model ID that may change during preview, here is the conceptual flow — get the current, exact code from Google's music-generation documentation:

1. Authenticate         -> API key (AI Studio / Gemini API) or
                           Google Cloud credentials (Vertex AI)
2. Select the model     -> the Lyria 3 Pro model identifier
3. Send the request     -> a text prompt (plus optional lyrics,
                           and up to 10 reference images or a PDF)
4. Receive the output   -> a finished 48 kHz stereo song, up to ~3 min,
                           returned as audio data you save or stream
5. Handle provenance    -> every output carries a SynthID watermark

The single most important part of the request is the prompt itself. Google publishes an official formula, and following its slot order gives the model the structure it was trained to read:

[Genre & style] + [Mood] + [Instrumentation] + [Tempo & rhythm] + [Vocal style & language] + [Lyrics]

Three flags do the heavy lifting inside a prompt string:

  • End the prompt with Instrumental. to generate no vocals.
  • Prefix with Lyrics: and the model sings your exact words.
  • Describe multiple singers to arrange a duet.

For full control over sections, Lyria 3 Pro reads a timestamp technique — scripting the arrangement with cues like [00:00] ... [03:00] to force section changes (intro, verse, chorus, bridge) at specific moments. This is the biggest lever developers overlook, because it turns "generate something poppy" into a deterministic arrangement. Google's prompting guide for Lyria 3 Pro has a full worked example; our flagship Lyria 3 Pro guide walks through the formula slot by slot.

Lyria 3 Pro API Pricing (Read This Carefully)

Here's the honest version most posts won't give you: Google does not publish one unified price for the Lyria 3 Pro API. On the Gemini API and Vertex AI, generation is metered — you pay per generation — while the model is in public preview, and those rates have moved during the preview window.

So the only reliable number is the one on Google's current rate card at the moment you build. Budget against that, not against a figure you saw in a blog post. You will see third-party articles quoting per-song and per-clip dollar amounts and consumer Gemini subscription tiers — treat all of those as unverified, check them yourself, and don't hard-code any of them into a cost model.

Two cost-shaping facts that are safe to plan around:

  1. A Lyria 3 Pro request returns a full ~3-minute song in one generation — you are not billed per 30 seconds the way the base model implies. That makes Pro surprisingly economical per finished minute of audio.
  2. Prototyping on the 30-second base Lyria 3 model before committing a Pro generation cuts wasted spend, because you validate genre, mood, and vocals cheaply first.

If per-request API billing and rate-card watching is more overhead than your project needs, a pay-as-you-go credit model is simpler to reason about: you buy a pack and spend a fixed number of credits per track, with no metered surprises. Exact credit costs are on our pricing page.

A Low-Friction Way to Validate Before You Build

Don't write your integration first. Prove the model does what you need in under five minutes:

  1. Open Google AI Studio, get a key, and generate one track from a plain prompt using the formula above.
  2. Add a Lyrics: block and a couple of [00:00]-style timestamps, and confirm the sections land where you asked.
  3. Only then decide between the Gemini API (ship it) and Vertex AI (govern it), and copy AI Studio's starter code as your baseline.

This ordering catches the two most common surprises — that there's no audio input, and that stems come back as a single mix — before they cost you a sprint.

Developer Gotchas Worth Knowing

  • No stems. The API returns a finished stereo mix, not isolated tracks. If your pipeline needs separate vocals/drums, add a stem-splitting step downstream.
  • No audio input, no voice cloning. You guide generation with text, lyrics, and images only.
  • Preview means change. On Vertex AI the model is public preview; version specs, model IDs, and rates can shift, so pin versions where you can and read release notes.
  • Every output is watermarked. SynthID is always embedded — inaudible, but detectable by AI-provenance tools. Plan for it if provenance matters.
  • Content checks can reject prompts. Outputs are screened against existing content, and prompts that lean too hard on a named living artist's style may be refused.

FAQ

Is there an official Lyria 3 Pro API? Yes. Google exposes it to developers through Google AI Studio, the Gemini API, and Vertex AI (public preview). All three call the same underlying model.

What's the difference between the Gemini API and Vertex AI for Lyria? The Gemini API is the lightweight path — an API key and an SDK. Vertex AI is the Google Cloud path with IAM, governance, regional endpoints, and a Media Studio UI, and it's where Lyria 3 Pro is labeled public preview.

How much does the Lyria 3 Pro API cost? Google doesn't publish one unified price; on the Gemini API and Vertex AI it's metered pay-per-generation during preview. Check Google's current rate card before budgeting, and treat any third-party dollar figures as unverified.

What does a Lyria 3 Pro API call return? A finished, high-fidelity stereo song at 48 kHz, up to about three minutes, generated in a single request — with a SynthID watermark embedded. Not stems, not a stream.

Can I send audio to the Lyria 3 Pro API? No. Inputs are text prompts, your own lyrics, and reference files (up to 10 images, plus PDF). There's no audio upload and no voice cloning.

Is Lyria RealTime the same as the Lyria 3 Pro API? No. Lyria RealTime is a separate, interactive, instrumental-only model that streams continuous audio for live control. Lyria 3 Pro renders finished, structured songs with vocals.

Bottom Line

The Lyria 3 Pro API isn't one thing — it's the same model behind three surfaces: AI Studio to prototype, the Gemini API to ship, Vertex AI to scale with governance. The model returns a complete 48 kHz stereo song, up to three minutes, with vocals in 8 languages, from a text prompt and optional images — no audio input, no stems, always watermarked. Pricing is metered pay-per-generation in preview, so build against Google's live rate card, not a blog's guess.

The fastest way to decide whether it fits your product is to hear one output first. Write a single sentence — genre, mood, one instrument, one vocal direction — and run it through the Lyria 3 Pro generator before you commit to a surface. If the sound is right, wire up the API path that matches your scale.

Sources

Primary sources for the factual claims above. Note: Lyria 3 Pro is partly in public preview — surfaces, specs, and rates may change after publication (July 2026).

Start Creating with Lyria 3 Pro Free Online

Use Lyria 3 Pro to turn a quick musical idea into a longer custom track, jingle, or instrumental in minutes.