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

# Producer Генерація текстів пісень API Інструкція з інтеграції

> Producer Music Generation 集成指南 - XHuoAPI

Producer дозволяє нам генерувати тексти пісень за допомогою підказок, цей документ пояснює методи інтеграції відповідного API.

Цей API має лише один вхідний параметр, а саме `prompt`, який є підказкою для генерації тексту пісні.

Тут ми вводимо `prompt` як `A song about winter`, що є підказкою для генерації тексту пісні.

```bash theme={null}
curl -X POST 'https://api.xhuoapi.ai/v1/producer/lyrics' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "prompt": "A song about winter"
}'
```

Результат виглядає так:

```
{
    "success": true,
    "task_id": "d354b519-43c0-4888-a3da-83adbf845fd6",
    "data": {
        "title": "Mercy in the Trees",
        "lyrics": "[Verse 1]\nI walked out past the railyard\nWhere the pines grow thick with frost\nThe snow doesn't care what I've done\nIt covers everything the same\n\n[Verse 2]\nThere's a chapel made of birch trunks\nAnd the altar is the ground\nI kneel there like a traitor\nWaiting for the silence to forgive\n\n[Chorus]\nWinter is a heavy coat\nWinter is a heavy coat\n\n[Verse 3]\nYou left before the first storm\nI stayed to watch the world go white\nNow every branch is a bone\nAnd I'm just counting what remains\n\n[Verse 4]\nThey say the cold will kill you\nBut I think it just makes you honest\nOut here with the frozen earth\nThere's nowhere left to hide your hands\n\n[Chorus]\nWinter is a heavy coat\nWinter is a heavy coat\n\n[Verse 5]\nI found your letter in my pocket\nThe ink had bled from all the thaw\nBut I could still read mercy\nWritten in the empty space between\n\n[Outro]\nThe trees don't ask for absolution\nThey just stand there, bare and true\nI'm learning how to do the same\nLetting the snow bury what it needs to bury"
    }
}
```

Можна побачити, що поле `lyrics` в `data` є згенерованим текстом пісні.
