> ## Documentation Index
> Fetch the complete documentation index at: https://docs.creatify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Lyria 3 Pro Text to Music API

> Generate complete tracks with vocals or instrumentals. Describe style, lyrics, and song structure in the prompt; track length is model-determined.

[← Lyria](https://docs.creatify.ai/api-documentation/ai-generation/models/lyria.md)

**Model name:** `lyria-3-pro/text-to-music`\
**Generation type:** `text_to_music`\
**Endpoint:** [`POST /api/asset_generator/`](https://docs.creatify.ai/api-reference/ai-generation/post-ai-generation)

## Pricing

**0.80** credits per output.

Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.

## Quick start

```bash cURL theme={null}
curl --request POST \
  --url https://api.creatify.ai/api/asset_generator/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: your-api-id' \
  --header 'X-API-KEY: your-api-key' \
  --data '{
    "model_name": "lyria-3-pro/text-to-music",
    "input_params": {
      "prompt": "An upbeat acoustic track for a summer product ad."
    }
  }'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.creatify.ai/api/asset_generator/",
    headers={"X-API-ID": "your-api-id", "X-API-KEY": "your-api-key"},
    json={
        "model_name": "lyria-3-pro/text-to-music",
        "input_params": {
            "prompt": "An upbeat acoustic track for a summer product ad."
        },
    },
)
print(response.json()["id"])
```

## Input parameters

Send these fields in `input_params`.

**prompt** `string` *required*

Describe genre, mood, instruments, tempo, vocals, and song structure. For background music, ask for instrumental only, no vocals.

Minimum characters: `1`.

> [accordion] Complete JSON schema
>
> ```json theme={null}
> {
>   "$schema": "http://json-schema.org/draft-07/schema#",
>   "required": [
>     "prompt"
>   ],
>   "properties": {
>     "prompt": {
>       "type": "string",
>       "title": "Prompt",
>       "minLength": 1,
>       "x-ui-name": "prompt",
>       "description": "Describe genre, mood, instruments, tempo, vocals, and song structure. For background music, ask for instrumental only, no vocals."
>     }
>   }
> }
> ```

## Response

The request returns the task with `status: "initializing"`. Poll [GET /api/asset\_generator/\{id}/](https://docs.creatify.ai/api-reference/ai-generation/get-ai-generation-.md) until `status` is `done` or `failed`, or pass a `webhook_url` to be notified. A finished task lists its files in `assets` and the credits it charged in `credits_used`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.