# Google Lyria 2 API

> Lyria 2 is Google's text-to-music model that generates a 30-second instrumental track as 48 kHz WAV audio from a description of genre, mood, instruments, and tempo.

Source: https://www.sandbase.ai/models/google/lyria-2
API reference: https://www.sandbase.ai/models/google/lyria-2#api

## Facts

- Provider: Google
- Type: Audio model
- Model ID: `google/lyria-2`
- Price: From $0.10 per run
- Capabilities: text to music
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "google/lyria-2",
  "prompt": "A lush, ambient soundscape featuring the serene sounds of a flowing river, complemented by the distant chirping of birds, and a gentle, melancholic piano melody that slowly unfolds.",
  "negative_prompt": "vocals, slow tempo"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Google Lyria 2 through SandBase?

Create a SandBase API key, then send requests with the model ID "google/lyria-2" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Google account?

No. One SandBase API key and balance gives you access to Google Lyria 2 and the other models in the catalog; you do not need to sign up with Google separately.

## README

### Lyria 2

Lyria 2 is Google's instrumental music model: one 30-second 48 kHz WAV clip per request.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, up to 2000 chars, required | — | Genre, mood, instruments, tempo. |
| `negative_prompt` | string | `low quality` | What to leave out, e.g. `vocals`. |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

$0.10 per 30-second clip.

| Request | Price |
|---|---|
| One clip | $0.10 |
| 10 clips | $1.00 |

Failed runs are not charged.

#### Prompting

- Lyria 2 makes instrumentals only; describe instruments and mood rather than lyrics.

#### Also on SandBase

Related: `google/lyria-3.5`, `google/lyria-3-clip-preview`, `google/lyria-3-pro-preview`.
