---
title: "Lyria 3 - Generate music from text"
method: POST
path: "/v1/ai/music-generation/lyria-3"
tags: ["music-generation"]
---

# Lyria 3 - Generate music from text

`POST /v1/ai/music-generation/lyria-3`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/music-generation/lyria-3`
- Auth: API key in header `x-magnific-api-key`

Generate original music tracks from text descriptions using Lyria 3, with optional image references to guide mood and style.

Describe the genre, mood, instruments, and tempo you want, and optionally attach reference images that inform the atmosphere of the composition. Ideal for video production, games, podcasts, and multimedia projects.

**Tips for effective prompts:**
- Include genre: "cinematic", "jazz", "electronic", "ambient"
- Describe mood: "dramatic", "playful", "tense", "peaceful"
- Mention instruments: "grand piano", "saxophone", "synth pads", "percussion"
- Add tempo hints: "andante", "fast-paced", "steady groove"

## Request body

- Request16
  - `prompt` string, required: Text description of the music you want to generate with Lyria 3. Be specific about genre, mood, instruments, and tempo for best results. **Tips for effective prompts:** - Include genre: "cinematic", "jazz", "electronic", "ambient" - Describe mood: "dramatic", "playful", "tense", "peaceful" - Mention instruments: "grand piano", "saxophone", "synth pads", "percussion" - Add tempo hints: "andante", "fast-paced", "steady groove"
  - `model` 'clip' | 'pro': Lyria 3 generation model variant. **Available models:** - `clip`: Faster generation optimized for short clips (default) - `pro`: Higher-fidelity generation for professional-quality tracks
  - `reference_images` Request16ReferenceImagesInner[]: Optional reference images to guide the mood and style of the generated music. Each entry must include the image URL and its MIME type. **Image requirements:** - Publicly accessible URLs or GCS format - Supported formats: PNG, JPEG, WebP
    - `image` string, required: Image URL (publicly accessible URL or GCS format)
    - `mime_type` 'image/png' | 'image/jpeg' | 'image/webp', required: MIME type of the reference image
  - `webhook_url` string, uri: Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

## Response `200`

OK - The task exists and the status is returned

- InlineObject4
  - `data` TaskDetail1, required
    - `task_id` string, uuid, required: Task identifier
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: Task status
    - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
