AI Music API: Lyria 3 Pro vs ElevenLabs Music vs Sonilo, and Which Are Safe for Commercial Use

AI music API tested: Lyria 3 Pro vs ElevenLabs Music vs Sonilo on ads, jingles and video, plus which are safe for commercial use.

AI music API comparison: Lyria 3 Pro vs ElevenLabs Music vs Sonilo, a composer at a mixing console

Every brand team I talk to wants custom music now. Nobody wants to be the person whose product launch gets a copyright claim. Those two facts are why the AI music API question has changed. A year ago it was "which one sounds best". Today it is "which one can I actually put in a paid ad".

The backdrop matters. In June 2024 the major labels sued Suno and Udio, and the settlements that followed in late 2025 turned on licensing. So when a vendor says its model is "commercial-safe", I want to know what that phrase is standing on: what the model was trained on, who owns the output, what the plan you are on actually allows, and who pays if something goes wrong.

I ran the same briefs through the three music models on Segmind: Google DeepMind's Lyria 3 Pro, ElevenLabs Music and Sonilo. That came to 18 API calls covering an ad bed, a brand jingle with my own lyrics, a two-minute podcast bed, a video score, a Hindi jingle and a copyright guardrail test. The whole run billed $2.17. Below is what came back, measured rather than eyeballed, and then what each vendor's terms actually say about commercial use.

The three models at a glance

Lyria 3 ProElevenLabs MusicSonilo
Built byGoogle DeepMindElevenLabsSonilo (ex-TikTok team, San Francisco)
Vocals and lyricsYes, your lyrics or its ownYes, your lyrics or its ownNo, instrumental and SFX only
Length controlIn the prompt (soft)music_length_ms, 3s to 10 minduration, 5s to 360s for music
Structure controlSection tags and timestampscomposition_plan, up to 30 chunksmusic_segments
Other inputsUp to 10 reference imagesNoneA video, via two separate endpoints
OutputMP3, 44.1 kHz stereoMP3 48 kHz 192 kbps by default, Opus optionsWAV or M4A (music)
Price on Segmind$0.10 per song$0.003125 per second$0.003125 per second (text); $0.01125 to $0.0225 per second (video)
Latency in my tests27s to 54s6s to 12s14s to 31s

All three are on Segmind as plain REST endpoints: Lyria 3 Pro, ElevenLabs Music and Sonilo as Sonilo Text to Audio, Video to Audio and Video to Video. One key, one bill.

How I tested

Same brief to every model wherever the model could take it. Every clip is embedded below. Duration and format came from ffmpeg. Loudness came from EBU R128, as integrated LUFS and true peak. Whether the lyrics were sung as written came from Whisper transcripts. Whether a requested structure happened came from tracking low-frequency energy (kick and bass) in 2.5-second windows. Costs are what Segmind's request history says each call billed.

Test 1: a 30-second ad bed for a marketing team

This is the bread-and-butter job: an agency needs a fresh instrumental under a 30-second spot, and needs it to be exactly 30 seconds.

Prompt used Upbeat 30-second instrumental bed for a running-shoe ad: driving electro-funk at 118 BPM in E minor, punchy live drums, slap bass, bright synth stabs, a riser at 0:20 and a clean button ending on the final beat. Instrumental only, no vocals.

Parameters Lyria 3 Pro: prompt only  |  ElevenLabs: music_length_ms 30000, force_instrumental true, model_id music_v2_5  |  Sonilo: duration 30, sound_type music, output_format m4a

Lyria 3 Pro
60.3s, $0.10

ElevenLabs Music
30.02s, $0.094

Sonilo
30.00s, $0.094

Same ad-bed brief, three models. Only two of them returned 30 seconds.

ElevenLabs and Sonilo both came back at 30 seconds to within two hundredths of a second. Lyria 3 Pro returned a 60.3-second track. That was not a one-off: all five times I asked Lyria for something under a minute (10 or 30 seconds), it came back between 58 and 68 seconds. The model page says length is "influenced" by the prompt, and in practice there seems to be a floor around one minute. For an ad, that means an editor trims it, and the trim point will not land on the musical ending.

The loudness numbers tell a second story. Lyria's track measured -12.5 LUFS with a true peak of +0.8 dBFS. That is over full scale, so you will want a limiter before it goes to a broadcast spec. ElevenLabs measured -14.4 LUFS at -0.7 dBFS and Sonilo -14.0 LUFS at -0.9 dBFS, both sitting where streaming platforms normalise. Every Lyria file in this test peaked above 0 dBFS.

On arrangement, the spectrograms differ. Sonilo's bed has a break just after the top, a lift in the middle and a breakdown before a final hit, which is the shape of an ad cue. ElevenLabs stays at an almost constant level (loudness range 1.2 LU), which is fine under a voiceover and dull on its own. Lyria built risers, but placed them inside its own one-minute structure, not at the 0:20 I asked for.

import requests

r = requests.post(
    "https://api.segmind.com/v1/elevenlabs-music",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "prompt": "Upbeat 30-second instrumental bed for a running-shoe ad ...",
        "music_length_ms": 30000,
        "model_id": "music_v2_5",
        "force_instrumental": True,
        "output_format": "auto",
    },
)
open("ad-bed.mp3", "wb").write(r.content)

Test 2: a brand jingle with your own lyrics

Jingles are where commercial risk gets personal, because legal approves the exact words. I wrote a two-line verse and a chorus for a made-up coffee brand and checked what got sung.

Prompt used A 30-second upbeat acoustic pop jingle for a neighbourhood coffee brand, 104 BPM in G major, ukulele, hand claps, upright bass and a warm female lead vocal.
[Verse]
Morning light on the corner street, Brightside pours it warm and sweet
[Chorus]
Brightside, Brightside, start your day right
One good cup and the world feels bright

Parameters Lyria 3 Pro: prompt only  |  ElevenLabs: music_length_ms 30000, force_instrumental false  |  Sonilo: duration 30

Lyria 3 Pro
65.4s, sang extra lines

ElevenLabs Music
30.02s, my lines only

Sonilo
30.00s, instrumental

Same lyrics, three models. Sonilo does not sing, by design.

ElevenLabs sang my verse and chorus, two separate transcripts found nothing added, and it stopped at 30 seconds. Lyria sang my lines word for word too, then kept going. It wrote a second verse ("Sip by sip and you start to smile, stay for a while") and a new chorus line ("Warmest coffee, shining so light") that nobody approved. For a demo that is generous. For a brand, it is copy that has not been through legal. Sonilo ignored the lyrics completely and returned an instrumental, which is exactly what its documentation promises.

So I tried to fix Lyria with its own tools: timestamps on every section, plus an explicit instruction to sing only the lyrics as written.

Prompt used A 30-second upbeat acoustic pop jingle for a neighbourhood coffee brand, 104 BPM in G major, ukulele, hand claps, upright bass and a warm female lead vocal. Sing only the lyrics below, exactly as written, with no additional lyrics. End the song at 0:30.
[0:00 - 0:12] [Verse]
Morning light on the corner street, Brightside pours it warm and sweet
[0:12 - 0:26] [Chorus]
Brightside, Brightside, start your day right
One good cup and the world feels bright
[0:26 - 0:30] [Outro] instrumental button ending

Parameters Lyria 3 Pro: prompt only

Lyria 3 Pro, constrained
58.1s file, song ends at about 37.5s

With timestamps and a lyrics-only instruction, Lyria sang exactly the approved words on schedule.

That worked on the words. The verse landed between 0:00 and 0:12 and the chorus between 0:12 and 0:27, and the transcript matched my script exactly with nothing added. The file still ran 58 seconds, though. The song ends at about 37.5 seconds, followed by roughly five seconds of true digital silence and then a ten-second instrumental reprise. The lesson for Lyria: timestamps are the lever for content, and you still need to trim.

Test 3: a two-minute podcast bed with a structure

Production houses and podcast networks need longer beds with a shape: a quiet intro under the host's open, a groove, and an outro that clears space. I asked for drums and bass to enter at 0:15 and drop out at 1:30. Lyria got the timestamps in the prompt. ElevenLabs got a three-chunk composition_plan with the same timings. Sonilo got three music_segments starting at 0, 15 and 90 seconds.

Prompt used A 2-minute lo-fi hip hop bed for a podcast, 82 BPM in F major, dusty Rhodes piano, soft vinyl crackle, brushed drums and warm upright bass. Instrumental only, no vocals.
[0:00 - 0:15] Intro: Rhodes alone with vinyl crackle
[0:15 - 1:30] Main groove: drums and bass enter
[1:30 - 2:00] Outro: drums drop out, Rhodes resolves and fades

Parameters Lyria 3 Pro: prompt only  |  ElevenLabs: composition_plan chunks of 15000 / 75000 / 30000 ms  |  Sonilo: duration 120, music_segments at 0s, 15s, 90s

Lyria 3 Pro
118.99s, $0.10

ElevenLabs Music
120.02s, $0.375

Sonilo
120.00s, $0.375

Two-minute lo-fi podcast beds with a requested intro, groove and outro.

At two minutes, Lyria hit the length almost exactly at 118.99 seconds, so its length floor clearly sits below the length of a full song. On structure, Lyria and ElevenLabs behaved almost identically. Both opened sparse with no bass, brought the bass in at about 10 seconds rather than 15, and dropped it at about 105 seconds rather than 90. That is the right shape, early in and late out. Sonilo had bass from the first second, kept the groove going to the very end and faded only in the final two seconds. The only trace of its 90-second segment was a brief dip near 92 seconds. If the outro matters, Sonilo needed the most editing here.

This is also where pricing flips. Lyria charges $0.10 per song whatever the length. ElevenLabs and Sonilo charge per second, so two minutes cost $0.375 each, nearly four times as much.

Test 4: scoring a finished video

For film and video teams, the real job is often "put music under this cut". Sonilo is the only one of the three that reads a video. I took a silent 10-second headphone spot from my Kling 4 tests and sent it to Sonilo Video to Video in music_and_sfx mode. Then I gave Lyria two frames from the same clip as reference images, and gave ElevenLabs a 10-second text brief.

Input: a silent 10-second product spot, 1280x720.

Prompt used music_prompt: warm minimal score, soft felt piano and airy synth pad, lifts gently as the headphones go on
sfx_prompt: soft fabric rustle, headphones set down on stone, distant city hush that fades when the headphones go on

Parameters sonilo-video-to-video  |  sound_type: music_and_sfx  |  preserve_speech: false  |  ducking: true

Sonilo Video to Video output: the same clip returned with a scored soundtrack muxed in, 10.04s, billed $0.226.

Sonilo returned the clip as an MP4 with the soundtrack already muxed in, matched to the frame (10.04 seconds). The spectrogram shows the score following the edit. A soft pad sits under the macro shots, and a rhythmic pulse arrives at about 3.4 seconds, right as the camera pulls back to reveal the person. Nobody told it where that moment was. Billing was exactly $0.0225 per second of video.

Prompt used A 10-second warm, minimal instrumental cue for a premium headphone ad shot at golden hour: soft felt piano, airy synth pad, a gentle pulse that lifts as the headphones go on. Instrumental only, no vocals.

Parameters Lyria 3 Pro: image_urls = 2 frames from the clip  |  ElevenLabs: music_length_ms 10000, force_instrumental true

Lyria 3 Pro + 2 frames
65.5s, $0.10

ElevenLabs Music
10.03s, $0.031

Text and image-guided alternatives for the same 10-second spot.

Lyria returned 65.5 seconds for a 10-second brief, so it is a library track to cut down, not a score. ElevenLabs delivered exactly 10.03 seconds for three cents and came in quieter (-19.5 LUFS), which leaves headroom for a voiceover. Neither of them knows where the cut is. If your input is a finished edit, Sonilo is doing a different and more useful job.

Test 5: a Hindi jingle

A lot of Segmind's customers ship regional ads, so I wrote a short Hindi tea-brand jingle in Devanagari, with the musical direction in English.

Prompt used A 30-second festive Indian pop jingle for a tea brand, sung in Hindi by a bright male lead, 100 BPM, dholak, tabla, harmonium and acoustic guitar.
[Verse]
सुबह की धूप में, गरम प्याली हाथ में
[Chorus]
ब्राइटसाइड चाय, हर दिन की नई शुरुआत

Parameters Lyria 3 Pro: prompt only  |  ElevenLabs: music_length_ms 30000, force_instrumental false

Lyria 3 Pro
68.7s, $0.10

ElevenLabs Music
30.02s, $0.094

Hindi lyrics in, Hindi vocals out, from both models.

Both sang in Hindi. A whisper-large-v3 transcript of the ElevenLabs track recovered my verse and chorus. This time ElevenLabs also added Hindi lines of its own ("दिल को दे सुकून", "नई सुबह नया जोश"), something it did not do in English.

The guardrail test: naming an artist

Last, I sent all three a prompt asking for a country-pop song "in the style of" a famous living singer. This is the request a careless user will make, and what happens next is part of what commercial-safe means.

  • Lyria 3 Pro blocked it in 1.8 seconds through the provider's content moderation. Billed $0.00.
  • ElevenLabs Music rejected it in 2.3 seconds with the reason copyrighted_material_detected, and sent back a rewritten prompt with the name removed. Billed $0.00.
  • Sonilo generated a 30-second instrumental and billed $0.094. It can't imitate a voice, because it doesn't sing, but it did not stop the request. I am not publishing that clip.

Two out of three refusing a named artist, for free, is a real safety net. With Sonilo the guardrail is your own prompt hygiene.

Which are safe for commercial use?

Here is what each vendor's own published terms say, checked on 1 November 2026. I'm not your lawyer, and terms change, so follow the links before you rely on any of it.

Lyria 3 ProElevenLabs MusicSonilo
Training dataMaterial "YouTube and Google has a right to use" under its terms and partner agreements; no named licensed catalogLaunched with agreements with Merlin and Kobalt"Trained only on professionally licensed music, including the Shutterstock catalog"
Who owns the outputGoogle won't claim ownership, but may generate similar content for othersYou retain rights in your input and outputSonilo assigns you any rights it has
Commercial scopeGoogle allows Preview models in production on Vertex AI; Lyria 3 Pro is still PreviewPlan-tiered: film, TV, radio and studio games need the Enterprise Music licenseIts licensing page says API output can be used commercially; film, TV and broadcast sit on the top tier of its app plans
IndemnityNot on Google Cloud's indemnified generative AI listNone in the music-specific termsNone; you indemnify Sonilo
Prompt rulesFilters block artist voices and copyrighted lyricsNo artist names, song titles or substantial lyrics in promptsNot enforced in my test
ProvenanceSynthID watermark on every outputNot stated in the music termsSays 2,000 test uploads to YouTube drew no Content ID claims, but makes no guarantee

Sources: Gemini API terms, Google's Lyria 3 Pro post, Google Cloud indemnified services, Eleven Music terms, Eleven Music launch, Sonilo licensing, Sonilo terms.

Three things jump out. First, none of the three indemnifies you for music output, so "commercial-safe" means "lower risk", not "someone else's risk". Second, the training-data stories are not equal. Sonilo names a licensed catalog. ElevenLabs names licensing partners. Google describes rights it holds without naming a catalog. Third, the plan you are on matters as much as the model. ElevenLabs and Sonilo both put film, TV and broadcast behind their top tiers, and Sonilo fixes your rights at the plan you were on when the track was generated.

One more thing to know if you call these through an API gateway like Segmind: your rights flow through the gateway's agreement with the provider, not through the vendor's consumer plans. For ads, social and apps, that is rarely a question. For a theatrical release, a TV spot or a big game launch, get the answer in writing before you ship.

My read, by job:

  • Instrumental beds for ads, apps and social: Sonilo has the cleanest training-data story and exact durations, and nothing it makes can be mistaken for a singer.
  • Jingles and songs with approved lyrics: ElevenLabs Music. It held to my English lyrics and length, and it actively refuses artist names. Check the plan you are on before anything goes to TV.
  • Long-form beds and volume: Lyria 3 Pro, at $0.10 per song regardless of length, with SynthID marking every track as AI. Trim it, limit it, and remember it is a Preview model.
  • Scoring a finished cut: Sonilo Video to Video. It is the only one that watches the footage.

What it costs on Segmind

Track lengthLyria 3 ProElevenLabs MusicSonilo Text to Audio
30 seconds$0.10 (you get about a minute)$0.094$0.094
2 minutes$0.10$0.375$0.375
3 minutes$0.10$0.5625$0.5625

All of these are the published Segmind rates, and every call in this test billed them exactly. ElevenLabs bills the returned duration to the hundredth of a second (30.02 seconds cost $0.0938125). Sonilo's video endpoints cost $0.01125 per second for music or effects alone and $0.0225 per second for both. Lyria 3, the 30-second clip version, is $0.05 per generation. Failed and refused calls billed nothing.

Honest assessment

ElevenLabs Music was the most predictable: exact lengths, my English lyrics as written, and a refusal that came with a usable rewrite. It was also the fastest, at 6 to 12 seconds per call. Its weakness was flat dynamics on the ad bed, and it padded the Hindi lyrics. Lyria 3 Pro gave the most music per dollar and followed a timestamped structure well, but it ignores short durations, adds lyrics unless told not to, and clips above 0 dBFS. Sonilo nailed durations and video sync and has the strongest licensing narrative, but it can't sing, followed my segments loosely, and didn't stop a named-artist prompt.

FAQ

Which AI music API is safest for commercial use?

Sonilo has the clearest training-data claim (licensed catalogs, including Shutterstock), and ElevenLabs Music has label licensing partners plus strict prompt rules. None of the three offers indemnity, so check your plan's media rights before broadcast use.

Can Lyria 3 Pro make a 30-second track?

Not reliably. In my tests every request under a minute returned 58 to 68 seconds. Ask for the length you need, then trim. At $0.10 flat per song, the extra length costs nothing.

Does ElevenLabs Music sing my exact lyrics?

In English it sang my verse and chorus as written and added nothing. In Hindi it sang my lines and then added its own. Always transcribe or listen before a jingle ships.

Can Sonilo generate vocals?

No. Sonilo generates instrumental music and sound effects only. It ignores lyrics in the prompt and returns an instrumental.

How much does an AI music API call cost on Segmind?

Lyria 3 Pro is $0.10 per song. ElevenLabs Music and Sonilo Text to Audio are $0.003125 per second, so $0.1875 a minute. Sonilo video scoring is $0.01125 to $0.0225 per second.

Will these models copy a famous artist?

Lyria 3 Pro and ElevenLabs Music refused a named-artist prompt in my test, at no charge. Sonilo generated an instrumental anyway, so keep artist names out of your prompts.

Wrapping up

For ads I would reach for Sonilo, for jingles ElevenLabs Music, for volume and long beds Lyria 3 Pro, and for scoring a finished cut Sonilo Video to Video. All of them are a single API call on Segmind, billed per song or per second, with no setup. Try ElevenLabs Music, Lyria 3 Pro or Sonilo with your own brief, and listen to what comes back before legal does.