> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Lyria 3.5 and Lyria 3 Pro

> Google Lyria 3.5 and Lyria 3 Pro on BeatAPI — full songs with vocals from a description or your lyrics, with the length and tempo you set, then extend a song or rewrite a section; $0.07 a song.

Google's Lyria music models on the [Audio API](/audio-api): `POST https://api.beatapi.io/v1/audios/tasks`. Describe a song, give it your lyrics, or both; set its length and tempo; then extend it or rewrite a section of it. Each call makes one song for one fixed price, whatever its length.

> **Warning**
>
> **Beta.** Lyria is served through Google Flow Music by a third-party route, not through Google's own API. A call may queue longer than usual or be briefly unavailable, and the options below may change. A task that fails is not billed.

## Models

| Model         | What it is                                                                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `lyria-3.5`   | Google's flagship music model: full songs with expressive vocals, timed lyrics and complete arrangements, up to four minutes. Recommended. |
| `lyria-3-pro` | The previous generation, at the same price.                                                                                                |

The two share one request contract and one price list. Songs are 48 kHz stereo; the primary file is an M4A, and a WAV of the same song and its cover art come with it.

## Make a song

`prompt` describes the song: genre, mood, instruments, voice and structure. `lyrics` carries your own lyrics, with section tags such as `[Verse]` and `[Chorus]`. Send either or both; without `lyrics` the model writes them, and writing `instrumental` in `prompt` asks for no vocals.

```bash
curl https://api.beatapi.io/v1/audios/tasks \
  -H "Authorization: Bearer $BEATAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: lyria-song-001" \
  -d '{
    "model": "lyria-3.5",
    "prompt": "Mandopop ballad, warm female vocal, acoustic guitar and soft piano",
    "lyrics": "[Verse]\nThe night wind runs down the alley\n[Chorus]\nWe sing until the morning",
    "duration": 90,
    "bpm": 80
  }'
```

| Field      | Meaning                                                                                                        |
| ---------- | -------------------------------------------------------------------------------------------------------------- |
| `prompt`   | A description of the song, up to 5,000 characters.                                                             |
| `lyrics`   | Your lyrics, up to 5,000 characters.                                                                           |
| `title`    | The song's title, up to 80 characters.                                                                         |
| `duration` | A target length in seconds, 1–240. It guides the model rather than binds it; see below.                        |
| `bpm`      | The tempo, 1–300.                                                                                              |
| `seed`     | An integer seed, 0–2147483647. The same request with the same seed makes a similar song, not an identical one. |

`duration` and `bpm` guide the model; they do not bind it. In our tests a song with full lyrics (verses and a chorus) and `duration: 90` came back at 93 seconds, while a request with only a two-line chorus and `duration: 40` was written out into a whole song of 174 seconds, with new verses around the chorus. Send the full lyrics when the length matters. The model may also add short vocal lines of its own, such as an intro hum. A song takes about 30 to 70 seconds.

## Actions

`action` picks the operation and defaults to `generate`. Each action accepts only its own fields; an extra field returns `400 bad_request` and the message names it. Prices are in USD per call.

| `action`          | What it does                                                   | Required                                                                                                          | Optional                                                  | Price  |
| ----------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ------ |
| `generate`        | A new song.                                                    | `prompt`, `lyrics`, or both                                                                                       | `title`, `duration`, `bpm`, `seed`                        | \$0.07 |
| `extend`          | Continues one of your Lyria songs from a point in it.          | `source_task_id` (+ `audio_id`), `prompt` (what to do), `continue_at` (seconds)                                   | `duration` (seconds to add, at most 164), `title`, `seed` | \$0.07 |
| `replace_section` | Rewrites a section of one of your Lyria songs.                 | `source_task_id` (+ `audio_id`), `prompt` (what to do), `section_start`, `section_end` (seconds, end after start) | `title`, `seed`                                           | \$0.07 |
| `lyrics`          | Writes lyrics and a matching style description, with no audio. | `prompt` (at most 3,000 characters)                                                                               | None                                                      | \$0.02 |

The Suno-only fields (`custom_mode`, `style`, `instrumental`, `negative_tags`, `persona_id` and the rest) and `audio_url` are not accepted by Lyria.

## Work on a song you made

The [general rules](/audio-api#work-on-a-song-you-made) apply; a Lyria follow-up names one of your Lyria tasks, and `audio_id` is that task's `output.tracks[0].id` (it may be left out). An extension returns the song up to `continue_at` followed by the new part; a rewritten section returns the whole song with that section replaced. Each is a new task with a new track id.

Continue a song from the 60-second mark for 30 seconds:

```json
{
  "model": "lyria-3.5",
  "action": "extend",
  "source_task_id": "task_9Fh2Lq",
  "continue_at": 60,
  "duration": 30,
  "prompt": "A piano break, then the chorus once more"
}
```

Rewrite seconds 10 to 20:

```json
{
  "model": "lyria-3.5",
  "action": "replace_section",
  "source_task_id": "task_9Fh2Lq",
  "section_start": 10,
  "section_end": 20,
  "prompt": "Only acoustic guitar in this part"
}
```

Write lyrics first, then sing them with `generate`:

```json
{
  "model": "lyria-3.5",
  "action": "lyrics",
  "prompt": "A Mandarin pop song about a summer day by the sea"
}
```

The finished `lyrics` task has no files; `output.data` carries the lyrics and a style description you can pass to `generate` as `lyrics` and `prompt`:

```json
{
  "lyrics": [
    { "title": "Orange Coast", "text": "[Verse 1]\nIced orange soda, bubbles in the glass\n..." }
  ],
  "style": "Mandopop, summer pop, breezy acoustic guitar riff, light tropical percussion"
}
```

## The result

A song action returns one track. `output.media` lists three files: the song as M4A (`audio/mp4`, also in `output.url` and `tracks[0].audio_url`), the same song as WAV, and its cover art (`tracks[0].image_url`). `tracks[0].lyrics` is the lyrics the model sang, including any lines it added, and `tracks[0].duration` its length in seconds.

## Errors

| Message                                                                                                   | Fix                                                                  |
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `generate needs "prompt" (a description of the song), "lyrics", or both`                                  | Send a description, lyrics, or both.                                 |
| `field "custom_mode" is not supported by model lyria-3.5`                                                 | A Suno field; Lyria does not take it.                                |
| `"duration" adds at most 164 seconds for action extend`                                                   | Extend in steps of up to 164 seconds.                                |
| `"source_task_id" is required for action extend: the id of your own Lyria task that made the song`        | Name the Lyria task that made the song.                              |
| `source_task_id was made by suno-v6, which lyria-3.5 cannot work on; use a suno model for this follow-up` | Work on a Suno song with a Suno model.                               |
| `"section_end" must be after "section_start"`                                                             | Fix the section times.                                               |
| `"action" must be one of: [generate extend replace_section lyrics]`                                       | Lyria has four actions; stems, covers and WAV conversion are Suno's. |

## Price list

Both models share these prices, in USD per call. A call costs the same for a 30-second and a four-minute song.

| Action                                  | Price  |
| --------------------------------------- | ------ |
| `generate`, `extend`, `replace_section` | \$0.07 |
| `lyrics`                                | \$0.02 |