← All playgrounds
High-fidelity instrumental music

Lyria 2 API

Google high-fidelity instrumental music generation.

Lyria 2 is a music generation model from Google, available on OttoPort's OpenAI-compatible API as the model ID lyria-2 at $0.069 / second as of 2026-10-14.

Provider

Google

Price

$0.069 / second

Model ID

lyria-2

Type

music generation model

Brand scoresProduct filmsBackground music

Create with Lyria 2

music
Duration

Your result appears here

Start with the example prompt or make it your own. Your OttoPort account is used securely for generation.

Pricing

Lyria 2 API pricing

What OttoPort bills for Lyria 2, and what that works out to per unit. Rates are read from the same catalog the gateway meters against, and were current on 2026-10-14.

Per second$0.069
30-second track$2.07
60-second track$4.14
Seconds per $10144of generated audio

No subscription and no minimum — OttoPort bills prepaid credits against usage. See the full rate card.

Quickstart

Call Lyria 2 in three lines

Send "model": "lyria-2" to POST https://ottoport.ai/api/v1/audio/music with an OttoPort key. No Google account, no waitlist, no separate SDK.

curl https://ottoport.ai/api/v1/audio/music \
  -H "Authorization: Bearer $OTTOPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lyria-2",
    "prompt": "warm optimistic electronic instrumental, 110 BPM, no vocals",
    "duration": 30
  }'

Before you start

  1. 1. Create a key at /api-keys.
  2. 2. Top up credits — the smallest pack is $25.
  3. 3. Paste the request. It returns a job ID; poll it or pass a webhook_url.

Full reference at /docs, or drive it from an agent with the MCP server and CLI.

Reference

Request parameters

The body POST https://ottoport.ai/api/v1/audio/music accepts for Lyria 2.

FieldTypeRequiredNotes
modelstringYesAlways lyria-2 for Lyria 2.
promptstringYesGenre, mood, instrumentation, tempo.
durationintegerNoSeconds of output. This is the billed unit.
Comparison

Lyria 2 direct vs through OttoPort

Lyria 2 is the same model either way — what changes is how many accounts, keys, and integrations you carry to reach it.

Google directVia OttoPort
Accounts and keysA Google account, plus one more for every other model you addOne OttoPort account and one key for the whole catalog
Request shapeGoogle's own SDK and response formatOpenAI-compatible — point baseURL at OttoPort and change the model string
Switching modelsA new integration per providerReplace lyria-2 with any other model ID in the catalog
BillingA separate invoice and contract per providerPrepaid credits, no subscription, one usage ledger
Provider outagesYour call failsConfigured backup routes are tried in order on provider failure
01

Set mood, genre, and energy.

02

Say whether vocals are wanted.

03

Describe the intended scene or usage.

FAQ

Lyria 2 API questions

Cost, keys, and model IDs for Lyria 2 on OttoPort.

How much does the Lyria 2 API cost?

On OttoPort, Lyria 2 costs $0.069 / second as of 2026-10-14. For scale, 30-second track: $2.07. Billing is prepaid usage with no subscription and no minimum, and the current rate is always published at ottoport.ai/pricing.

How do I get a Lyria 2 API key?

You do not need a Google key. Create an OttoPort account, generate a key at ottoport.ai/api-keys, and send it as "Authorization: Bearer <key>" to POST https://ottoport.ai/api/v1/audio/music with "model": "lyria-2". The same key reaches every other model in the catalog.

What is the model ID for Lyria 2?

The OttoPort model ID for Lyria 2 is lyria-2. Pass it as the model field on POST https://ottoport.ai/api/v1/audio/music, or list it programmatically from GET https://ottoport.ai/api/v1/models.

Is Lyria 2 generation synchronous?

No. POST https://ottoport.ai/api/v1/audio/music returns a job ID immediately. Poll GET https://ottoport.ai/api/v1/videos/generations/{id} for status, or pass webhook_url and webhook_secret and OttoPort will call you when the job settles. You are billed per second of output, so a failed job costs nothing.

Do I need a Google account to use Lyria 2?

No. OttoPort connects to Google on your behalf, so one OttoPort account covers Lyria 2 and every other model in the catalog — no per-provider contracts, keys, or invoices.

Alternatives

Other music generation models on the same API

Same endpoint, same key — swapping model is a one-string change from lyria-2.

Browse the full catalog — every model with its provider and per-unit price.