Comparison
Lyria 3 Pro Comparison: Choosing a Music Model and Migrating
A developer's guide to evaluating text-to-music APIs, comparing per-song pricing and capabilities, and planning a low-risk migration
На этой странице
What to compare in a text-to-music API
Most text-to-music demos are judged by how good a single sample sounds. That is the wrong axis for a decision that has to survive production. When you are wiring a music model into a product, the qualities that determine whether the integration is pleasant or painful are structural: what inputs the route accepts, how much control the prompt gives you, what the output actually is, how billing is calculated, and whether you can reproduce a result when a user asks for it again.
It helps to compare candidates on five axes.
Input modalities
Does the route take text only, or can it also accept reference material such as images? Extra modalities are only useful if they map to something your users already have. An inspiration-image input is valuable if your app already collects mood boards; it is dead weight if every request starts from a text box.
Prompt controls
Look at the maximum prompt length and whether the model documents structured guidance — genre, instruments, tempo, lyrics, and arrangement markers. A short prompt cap forces you to compress intent and can push complexity into your own prompt-assembly layer. Explicit timestamp support means you can steer song structure rather than hoping the model finds a chorus on its own.
Output type
Music models return audio. Confirm the output is a finished audio asset you can hand to your storage and delivery pipeline, and check whether you get one track per request or a set. Anything you need beyond that — trimming, loudness normalization, format conversion — is your pipeline's job, so plan for it explicitly.
Billing unit
This is the axis teams under-weight. Token-based billing scales with prompt and output length; duration-based billing scales with how long the generated audio is; per-song billing scales with how many generations you request. Each one produces a different cost curve as your workload grows, and each one interacts differently with retries and user-driven regeneration.
Reproducibility
If a user likes a track and wants a variation or an exact re-render, you need to know whether the API offers a seed and how strong that guarantee is. "Reproducible" and "deterministic" are not the same promise, and the difference shapes your caching and retry design.
Compare candidates on these five axes before you compare sample quality. Sound quality gets you a shortlist; these axes decide what ships.
Where Lyria 3 Pro fits
Lyria 3 Pro is Google's text-to-music model, exposed on HiAPI.ai as a single text-to-music route. Its integration surface is deliberately small, which makes it easy to reason about during evaluation.
The route takes one required parameter and two optional ones.
prompt(required, string, 1 to 5000 characters): describes genre, instruments, mood, tempo, lyrics, and song structure. Timestamps such as[0:00 - 0:30]can guide the arrangement.image_urls(optional, array, 1 to 10 items): inspiration images that guide mood, theme, and musical composition. They are not visual frames and they are not source media for the audio output — treat them as creative direction, not as something that gets rendered.seed(optional, integer, minimum 0): a seed for reproducible generation, with the caveat that exact determinism is not guaranteed.
Output is audio (music). Billing is per song in a single tier.
The shape of that contract tells you a lot. There is no multi-stage pipeline to orchestrate: one call in, one audio asset out, with an optional creative-direction input and an optional reproducibility handle. That keeps the client code short, but it also means your product logic carries the weight — prompt construction, image selection, seed storage, and everything that happens to the audio after the response arrives.
The 5000-character prompt cap is generous enough to carry a full structured brief: a paragraph of genre and mood, an instrument list, tempo and key, lyrics if you need them, and a timestamped arrangement outline. You should treat that budget as a design constraint rather than something to fill. The route page with parameter details and the live price panel is at Lyria 3 Pro.
If your comparison shortlist includes models with reference-audio inputs, multi-track output, or duration-tiered billing, Lyria 3 Pro is the simpler end of that spectrum: one prompt, optional images, optional seed, one song.
Pricing models and cost planning per song
Per-song billing changes the arithmetic of cost planning. Instead of modeling tokens or seconds, you model generation count — and that number is usually driven by product behavior rather than by prompt length.
The three shapes of cost
Token-based billing means a long prompt and a long output both cost more. Duration-based billing means a two-minute track and a five-minute track are different line items. Per-song billing means one request produces one song and consumes one billing unit, regardless of how detailed your prompt was or how long the resulting track runs. For planning purposes, that collapses a lot of variance: your spend is a function of how many songs you generate.
Estimating a workload
The estimate is deliberately boring, which is a feature:
- Count generations per user session. If a typical session asks for one track but power users ask for five variations, model the distribution, not the average.
- Add regeneration. Users reject outputs, and retries happen on the server side too. A rejection rate of any size multiplies your base count.
- Multiply by expected monthly sessions.
Because the unit is a song, prompt-engineering experiments cost the same per call as production calls. That is convenient for evaluation — you can iterate on prompt structure without a cost penalty for verbosity — but it also means there is no cheaper "small" request. Every call is a full song.
What this means for retry and caching policy
Per-song billing makes retries and duplicate generations the main cost risk. Two mitigations matter:
- Cache aggressively. Store generated audio keyed by the normalized prompt plus seed plus image set, and serve repeats from storage instead of regenerating.
- Guard regeneration in the UI. A user tapping "generate again" three times in ten seconds should hit a debounce or a queue, not the API three times.
Compare like with like
When you put per-song pricing next to token- or duration-based competitors, normalize to a common unit: cost per finished song at your typical length and prompt complexity. A model that looks cheaper per token can end up more expensive per delivered track if your prompts are long or your tracks run long. Conversely, per-song pricing can look expensive for very short clips where duration-based billing would charge a fraction. Decide what a "song" means in your product first, then compare. Official pricing is $0.14 per track. Current per-song pricing also lives on the model page; integrate against this official rate and re-check the panel if you need to confirm.
Prompt design: genre, structure, and timestamped arrangement
The prompt is where most of the model's behavior is decided, and the route gives you up to 5000 characters to work with. A useful pattern is to treat the prompt as a structured brief rather than a sentence.
A practical prompt skeleton
Genre: [primary genre, subgenre]
Mood: [emotional descriptors]
Tempo: [BPM or descriptive]
Instruments: [list, most prominent first]
Vocals: [instrumental | lead vocal style | choral]
Lyrics: [verse/chorus text, or "instrumental"]
Structure:
[0:00 - 0:15] intro description
[0:15 - 0:45] verse description
[0:45 - 1:15] chorus description
[1:15 - 1:30] outro description
This is not a required format — the parameter is a free string — but a consistent skeleton makes prompts diffable, testable, and easy to assemble from UI controls. If your product exposes sliders for genre and mood, the prompt builder is a small template function, and you can snapshot its output in tests.
Using timestamps for arrangement
The documented example format is [0:00 - 0:30], and timestamp guidance is the most direct lever on song structure. Without it, the model decides where sections fall. With it, you can specify when the intro ends, when the chorus lands, and how long the outro runs. Practical rules:
- Keep sections in chronological order and make them cover the full intended runtime without gaps or overlaps.
- Describe each section in one clause ("sparse piano, building strings") rather than paragraphs.
- Do not over-specify. Five to eight sections is usually enough for a coherent arrangement; twenty micro-sections tend to produce muddled results and are harder to debug.
Genre, instruments, and mood
Put the highest-signal descriptors first. Genre and mood set the overall distribution; the instrument list narrows timbre; tempo anchors energy. Vague mood words ("nice", "good vibe") do little. Concrete ones ("wistful", "driving", "cavernous") do more.
Lyrics and vocals
If you want instrumental output, say so explicitly. If you want lyrics, include them as text within the prompt and describe the vocal style. Keep lyric blocks clearly separated from structural notes so the model does not read stage directions as lyrics.
Length budget
5000 characters is plenty for a detailed brief. Resist filling it. Long, contradictory prompts are a common cause of unsatisfying output, and because billing is per song rather than per token, a shorter focused prompt does not save money — it saves quality.
Using inspiration images and seeds correctly
Two optional parameters carry most of the nuance in this route: image_urls and seed. Neither is required, and both are easy to misuse.
image_urls
The parameter is an array with a minimum of 1 and a maximum of 10 items. It is optional, so zero images means you simply omit it — but if you send the field, it must contain between one and ten entries. An empty array is a likely source of request errors, so sanitize in your client: strip nulls and empty strings before deciding whether to send the field at all.
What images do here is guide mood, theme, and musical composition. They are explicitly not visual frames and not source media for the audio — there is no image-to-audio rendering step where pixels become waveforms. Practically, this means image selection is a creative-direction problem. A moody landscape and a warm interior may push the track in different directions; a screenshot of your app's UI will not be "translated" into music in any literal sense.
Design implication: if your product collects images from users, curate what you forward. Ten loosely related images are likely to dilute the direction rather than sharpen it.
seed
The seed parameter is an integer with a minimum of 0. It is an optional handle for reproducible generation — and the documentation is explicit that exact determinism is not guaranteed. Take that caveat seriously.
That means you should not treat a seed as a cache key that guarantees identical bytes on a miss. Instead:
- Store the seed alongside every generated asset so you can attempt a re-render.
- Treat a regenerated track as "the same direction, possibly not the same audio." If your product offers a "play it again" feature, be honest in the UI about what that means.
- Do not build contractual guarantees ("identical to your preview") on top of seed replay.
- For variation, reuse the prompt and change the seed; for stability, reuse both and accept that outputs may drift slightly.
Combining them
Images and seeds compose cleanly: images steer the creative direction, the seed is a reproducibility handle. A reasonable pattern is to fix the image set per project or mood board, generate several seeds for a prompt, and let the user pick from a small set of variations. That keeps the expensive creative decision (which images) stable while giving the user control over the cheap one (which take).
Migration checklist from another music model
Moving to a new music model is mostly a parameter-mapping exercise followed by an audio-pipeline audit. Work through these stages in order; each one is safe to stop at.
1. Inventory your current request shape
List every input your existing integration sends: free-text prompt, negative prompt, duration, genre tags, reference audio, style presets, seeds, and any model-specific knobs. Classify each as maps cleanly, maps approximately, or has no equivalent.
2. Map to prompt, images, and seed
Most of the mapping collapses into the prompt string, because the prompt covers genre, instruments, mood, tempo, lyrics, and structure.
- Style presets and genre tags become structured clauses in the prompt skeleton.
- Negative prompts have no dedicated field; express constraints as positive descriptions instead ("solo piano, no drums" rather than a separate exclusion list).
- Fixed durations have no parameter; steer length with timestamped arrangement sections.
- Reference audio has no equivalent on this route; if it was central to your product, that is a product decision, not a mapping one.
- Existing seeds map to
seed, subject to the determinism caveat. - If your old integration used visual references, map them to
image_urls, respecting the 1-to-10 array bound.
Build a prompt-assembly function and snapshot its output in tests so the mapping is reviewable rather than a pile of string concatenation.
3. Run sandbox generations
Generate a representative set: your most common request, your most complex prompt, your longest prompt, and a case with images. Check that long prompts stay under the 5000-character cap, and that image arrays are within 1 to 10. Confirm every request includes a non-empty prompt.
4. Validate the audio handling path
This is where migrations actually break. Your new output is an audio asset from a different source, so verify: storage upload, content type, playback in your client, duration assumptions in the UI, and any downstream processing such as trimming or normalization. Re-run your loudness and format checks against real generated tracks rather than assuming they carry over.
5. Model cost per song
Rebuild your cost estimate on the per-song unit: generations per session, regeneration rate, monthly volume. Compare against your previous model's unit cost at the same normalized "cost per finished song" basis. Confirm figures against the price panel rather than any number quoted in documentation.
6. Cut over gradually
Route a small percentage of traffic to the new model, keep the old path warm, and watch both error rates and user regeneration behavior. Because billing is per song, a misbehaving client that retries in a loop will show up quickly in cost — which makes the gradual phase a useful detector.
7. Clean up
Remove dead parameters from your config, update seed and image storage, and delete any code paths that only existed to support the old model's request shape.
Failure modes and how to debug them
The route's small surface means failures cluster around a handful of causes. Here is how to triage them.
Missing or empty prompt
prompt is required with a minimum length of 1. The most common failure is a prompt-assembly function that returns an empty string when optional UI fields are blank. Log the assembled prompt before the request and assert non-empty in your client. If you build prompts from templates, test the all-fields-empty case explicitly.
Prompt over the length cap
The maximum is 5000 characters. Long lyric blocks plus a detailed arrangement can exceed this, especially if you append boilerplate to every prompt. Measure the assembled length in your logs and truncate or restructure rather than letting the request fail. Truncation should cut from the least important section — usually trailing structural notes — not from the middle of a lyrics block.
Image array bounds
image_urls is optional, but when present it must contain between 1 and 10 items. The classic mistake is sending an empty array from a UI where the user selected nothing. Decide in the client: zero images means omit the field entirely. Also check for null entries or placeholder URLs from your form state before sending.
Unexpected or invalid seed values
seed is an integer with a minimum of 0. Fractional values, strings, or negative numbers from a random-number helper (for example, a signed 32-bit generator producing negatives) will fail. Normalize in one place — a small toSeed() helper that clamps and floors — and log the raw value when it is rejected.
"The seed did not reproduce my track"
Not a bug. Exact determinism is not guaranteed. If your product promised byte-identical regeneration, the product promise is the thing to fix, not the request.
Output sounds unrelated to the images
Also expected from the documentation: image_urls guide mood, theme, and composition; they are not visual frames or source media. If image-driven control is central to your feature, put the concrete direction in the prompt and use images as a secondary steer.
Cost spikes without traffic spikes
Per-song billing makes this diagnosable: duplicate generations. Look for retry loops, missing debounce on regenerate buttons, and cache misses caused by prompt strings that differ by a timestamp or whitespace. Normalize prompts before using them as cache keys.
A small logging strategy — assembled prompt, its length, image count, seed, and request id — makes nearly all of these one-glance diagnoses.
Похожие статьи
Все статьи →-
Comparison
gpt-6.2-sol vs. comparable models: How developers should choose and migrate
Make a side-by-side decision across three dimensions: capability boundaries, pricing structure, and migration cost
-
Comparison
gpt-6.2-astra Side-by-Side Comparison and Selection Guide: How Developers Can Decide Whether It Is Worth Integrating
-
Comparison
Tripo H3.1 Side-by-Side Comparison and Selection Guide: How to Choose Among Three 3D Generation Paths and How to Save
A developer-oriented trade-off between pricing and capability, starting from input form, geometric refinement, and PBR/texture switches