> ## 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 Custom Singer Style API Integration Instructions

> Suno Music Generation 集成指南 - XHuoAPI

SUNO allows us to set the singer style for songs that have already been generated, and then create secondary works based on it. This document explains the integration method for the relevant API.

This API has only three input parameters: first, `audio_id`, which is the ID of a song that has been successfully generated by the official service; second, `name` and `description`, which are a name and description of the singer style.

Here, the `audio_id` we input is `https://cdn.xhuoapi.ai/2qhzs3.png`, which can refer to the [Suno Audios Generation API](https://api.xhuoapi.ai/documents/4da95d9d-7722-4a72-857d-bf6be86036e9) for custom song generation, and finally obtain the `audio_id`.

```bash theme={null}
curl -X POST 'https://api.xhuoapi.ai/v1/suno/persona' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "name": "test",
  "audio_id": "81745564-60e7-4ad4-85a9-6f42f0f4f3b3",
  "description": "test"
}'
```

The result is as follows:

```
{
  "success": true,
  "task_id": "8e808558-f056-456f-91d6-b97fd94eb3be",
  "data": {
    "persona_id": "dae4ae5d-2b51-4af1-b286-1a4473ef4dba"
  }
}
```

As can be seen, the `persona_id` field in `data` is the ID of the generated singer style.

With the singer style ID, we can use the [Suno Audios Generation API](https://api.xhuoapi.ai/documents/4da95d9d-7722-4a72-857d-bf6be86036e9) to generate custom songs. For example, pass `action` as `artist_consistency`, while `audio_id` is the uploaded song ID, and also upload the parameter `persona_id`, which is the singer style ID returned above, to generate new songs based on the reference singer style.
