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

# Suno 歌詞生成 API 對接說明

> Suno Music Generation 集成指南 - XHuoAPI

如果你想自訂生成歌曲，但又不太想自己編寫歌詞，可以使用 XHuoAPI 提供的歌詞生成 API 來透過 prompt 生成歌詞，API 是 [Suno Lyrics Generation API](https://api.xhuoapi.ai/documents/514d82dc-f7ab-4638-9f21-8b9275916b08)。

該 API 主要輸入參數是 `prompt`，可選 `model`（預設 chirp-v3），填寫樣例如下：

![](https://cdn.xhuoapi.ai/p53wtj.png)

這裡我們輸入的 `prompt` 是 `A song about winter`，生成和冬天相關的歌曲。

點擊運行，結果如下：

```
{
  "success": true,
  "task_id": "57e8ce3a-39cb-41a2-802f-e70a324f4d0a",
  "data": {
    "text": "[Verse]\nSnowflakes falling from the sky\nWinter's cold touch\nOh how it gets me high\nI bundle up in layers\nOh so cozy\nStepping out and feeling the frost on my nose\nSee\n\n[Verse 2]\nThe world is covered in a blanket of white\nIcicles hanging\nShimmering so bright\nThe chilly air fills my lungs with every breath\nWalking in the snow\nLeaving footprints that won't be left\n\n[Chorus]\nOh\nWinter's cold touch\nIt's a season that I love so much\nSnowfall brings a feeling so divine\nWinter's cold touch\nIt's a magical time",
    "title": "Winter's Cold Touch",
    "status": "complete"
  }
}
```

可以看到，`data` 的 `text` 欄位就是歌詞信息。

有了歌詞之後，我們便可以使用 [Suno Audios Generation API](https://api.xhuoapi.ai/documents/4da95d9d-7722-4a72-857d-bf6be86036e9) 來進行自訂歌曲生成了。
