# Lyria3

> Lyria 3 is most recent music model from Google


## Overview

- **Endpoint**: `https://fal.run/fal-ai/lyria3`
- **Model ID**: `fal-ai/lyria3`
- **Category**: text-to-audio
- **Kind**: inference
**Tags**: audio, music, sfx



## Pricing

- **Price**: $0.04 per audios

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`prompt`** (`string`, _required_):
  The text prompt describing the music you want to generate. Include genre, mood, instrumentation, tempo, and vocal style for best results. Lyria 3 supports vocals, lyrics, and multi-language generation.
  - Examples: "An energetic electronic dance track with soaring synth leads, punchy four-on-the-floor kick drums, and a catchy vocal hook singing 'Feel the rhythm, feel the night'. 128 BPM."

- **`negative_prompt`** (`string`, _optional_):
  A description of what to exclude from the generated audio. Default value: `""`
  - Default: `""`
  - Examples: "low quality, distorted", "vocals, slow tempo"

- **`image_url`** (`string`, _optional_):
  Optional image URL to use as inspiration for music generation. The model will create music that matches the mood and theme of the image.
  - Examples: "https://v3b.fal.media/files/b/0a93b559/qjT9o0CId1B65PbD6Yp06_9c94501900464c5aa98f302fa4b00375.png"



**Required Parameters Example**:

```json
{
  "prompt": "An energetic electronic dance track with soaring synth leads, punchy four-on-the-floor kick drums, and a catchy vocal hook singing 'Feel the rhythm, feel the night'. 128 BPM."
}
```

**Full Example**:

```json
{
  "prompt": "An energetic electronic dance track with soaring synth leads, punchy four-on-the-floor kick drums, and a catchy vocal hook singing 'Feel the rhythm, feel the night'. 128 BPM.",
  "negative_prompt": "low quality, distorted",
  "image_url": "https://v3b.fal.media/files/b/0a93b559/qjT9o0CId1B65PbD6Yp06_9c94501900464c5aa98f302fa4b00375.png"
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`File`, _required_):
  The generated music as an MP3 file.
  - Examples: "https://v3b.fal.media/files/b/0a93b550/klduxmeWsmi304M3zsAlr_output.mp3"

- **`lyrics`** (`string`, _optional_):
  The generated or provided lyrics for the track, if applicable.
  - Examples: "Caption: This is a high-energy Progressive House anthem, a subgenre of EDM defined by its massive scale and uplifting melodic content, all polished with a clean, powerful, and wide stereo production aesthetic. The rhythmic foundation is a punchy, heavily compressed four-on-the-floor kick drum, modeled after a classic Roland TR-909, providing a relentless pulse at 128 BPM. Supporting the kick are crisp, bright open hi-hats on the off-beats and a thick clap/snare layer on beats 2 and 4. The harmonic and melodic core is built from multiple synth layers: vast, shimmering supersaw synth pads play a soaring major-key chord progression; a powerful, monophonic sawtooth bassline plays the root notes and is aggressively side-chained to the kick drum to create the genre's signature 'pumping' effect. Above it all, a soaring supersaw lead synth—composed of multiple detuned sawtooth waves to create a thick, wide sound—plays a memorable, uplifting arpeggiated melody. A powerful, clean female vocal delivers the catchy hook, processed with significant hall reverb and delay to make it feel enormous and seamlessly blend with the synths. The entire instrumental bed (pads, lead, bass) is also heavily side-chained to the kick, ensuring every element ducks in volume with each beat to maximize the kick's punch and drive the track forward.\nMosic: 4.5\nBPM: 128.0"



**Example Response**:

```json
{
  "audio": "https://v3b.fal.media/files/b/0a93b550/klduxmeWsmi304M3zsAlr_output.mp3",
  "lyrics": "Caption: This is a high-energy Progressive House anthem, a subgenre of EDM defined by its massive scale and uplifting melodic content, all polished with a clean, powerful, and wide stereo production aesthetic. The rhythmic foundation is a punchy, heavily compressed four-on-the-floor kick drum, modeled after a classic Roland TR-909, providing a relentless pulse at 128 BPM. Supporting the kick are crisp, bright open hi-hats on the off-beats and a thick clap/snare layer on beats 2 and 4. The harmonic and melodic core is built from multiple synth layers: vast, shimmering supersaw synth pads play a soaring major-key chord progression; a powerful, monophonic sawtooth bassline plays the root notes and is aggressively side-chained to the kick drum to create the genre's signature 'pumping' effect. Above it all, a soaring supersaw lead synth—composed of multiple detuned sawtooth waves to create a thick, wide sound—plays a memorable, uplifting arpeggiated melody. A powerful, clean female vocal delivers the catchy hook, processed with significant hall reverb and delay to make it feel enormous and seamlessly blend with the synths. The entire instrumental bed (pads, lead, bass) is also heavily side-chained to the kick, ensuring every element ducks in volume with each beat to maximize the kick's punch and drive the track forward.\nMosic: 4.5\nBPM: 128.0"
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/lyria3 \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "An energetic electronic dance track with soaring synth leads, punchy four-on-the-floor kick drums, and a catchy vocal hook singing 'Feel the rhythm, feel the night'. 128 BPM."
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/lyria3",
    arguments={
        "prompt": "An energetic electronic dance track with soaring synth leads, punchy four-on-the-floor kick drums, and a catchy vocal hook singing 'Feel the rhythm, feel the night'. 128 BPM."
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/lyria3", {
  input: {
    prompt: "An energetic electronic dance track with soaring synth leads, punchy four-on-the-floor kick drums, and a catchy vocal hook singing 'Feel the rhythm, feel the night'. 128 BPM."
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/lyria3)
- [API Documentation](https://fal.ai/models/fal-ai/lyria3/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/lyria3)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
