# Ltx 2.3 Quality

> Text to Audio high-quality using LTX-2.3 


## Overview

- **Endpoint**: `https://fal.run/fal-ai/ltx-2.3-quality/text-to-audio`
- **Model ID**: `fal-ai/ltx-2.3-quality/text-to-audio`
- **Category**: text-to-audio
- **Kind**: inference
**Tags**: text-to-audio



## Pricing

Your request will cost $0.0024075 per megapixel of generated video data (width × height × frames), rounded up. For example, if you generate a video that is 121 frames long at 1280 × 720, your total generated video is ≈112 MP, and your request will cost $0.2696.

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 prompt to generate the audio from.
  - Examples: "A woman says: 'Oh, what a lovely day we are having!' Natural speech, clean studio audio."

- **`num_frames`** (`integer`, _optional_):
  The audio duration expressed in LTX video-frame units. Duration is approximately num_frames / frames_per_second seconds. Default value: `121`
  - Default: `121`
  - Range: `9` to `481`

- **`frames_per_second`** (`float`, _optional_):
  Frame rate used to derive the generated audio duration. Default value: `24`
  - Default: `24`
  - Range: `1` to `60`

- **`num_inference_steps`** (`integer`, _optional_):
  Number of inference steps. Default value: `15`
  - Default: `15`
  - Range: `8` to `30`

- **`guidance_scale`** (`float`, _optional_):
  Classifier-free guidance scale. Default value: `1`
  - Default: `1`
  - Range: `1` to `20`

- **`negative_prompt`** (`string`, _optional_):
  The negative prompt to steer generation away from. Default value: `"pc game, console game, video game, cartoon, childish, ugly"`
  - Default: `"pc game, console game, video game, cartoon, childish, ugly"`

- **`seed`** (`integer`, _optional_):
  Random seed for reproducibility. If None, a random seed is chosen.

- **`enable_prompt_expansion`** (`boolean`, _optional_):
  Whether to enable prompt expansion.
  - Default: `false`

- **`enable_safety_checker`** (`boolean`, _optional_):
  Whether to enable the safety checker. Default value: `true`
  - Default: `true`

- **`sync_mode`** (`boolean`, _optional_):
  If True, the audio is returned as a data URI inline in the response. Useful for short-lived requests and tests.
  - Default: `false`



**Required Parameters Example**:

```json
{
  "prompt": "A woman says: 'Oh, what a lovely day we are having!' Natural speech, clean studio audio."
}
```

**Full Example**:

```json
{
  "prompt": "A woman says: 'Oh, what a lovely day we are having!' Natural speech, clean studio audio.",
  "num_frames": 121,
  "frames_per_second": 24,
  "num_inference_steps": 15,
  "guidance_scale": 1,
  "negative_prompt": "pc game, console game, video game, cartoon, childish, ugly",
  "enable_safety_checker": true
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`File`, _required_):
  The generated audio.

- **`seed`** (`integer`, _required_):
  The seed actually used for generation.

- **`prompt`** (`string`, _required_):
  The prompt used for generation (after any expansion).



**Example Response**:

```json
{
  "audio": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  },
  "prompt": ""
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/ltx-2.3-quality/text-to-audio \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "A woman says: 'Oh, what a lovely day we are having!' Natural speech, clean studio audio."
   }'
```

### 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/ltx-2.3-quality/text-to-audio",
    arguments={
        "prompt": "A woman says: 'Oh, what a lovely day we are having!' Natural speech, clean studio audio."
    },
    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/ltx-2.3-quality/text-to-audio", {
  input: {
    prompt: "A woman says: 'Oh, what a lovely day we are having!' Natural speech, clean studio audio."
  },
  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/ltx-2.3-quality/text-to-audio)
- [API Documentation](https://fal.ai/models/fal-ai/ltx-2.3-quality/text-to-audio/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/ltx-2.3-quality/text-to-audio)

### 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)
