> ## 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는 우리가 참조 오디오를 업로드하여 2차 창작을 할 수 있도록 허용합니다. 본 문서는 관련 API의 연동 방법을 설명합니다.

이 API는 단 하나의 입력 매개변수인 `audio_url`을 가지고 있으며, 이는 공개적으로 접근 가능한 CDN 주소로 mp3 확장자를 지원합니다.

여기서 입력하는 `audio_url`은 `https://cdn.xhuoapi.ai/suno_demo.mp3`로, 공개적으로 접근 가능한 CDN 주소입니다.

```bash theme={null}
curl -X POST 'https://api.xhuoapi.ai/v1/producer/upload' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "audio_url": "https://cdn.xhuoapi.ai/suno_demo.mp3"
}'
```

결과는 다음과 같습니다:

```
{
  "success": true,
  "task_id": "23e7d4ec-d1a8-429f-87d8-9f53fc3b6666",
  "data": {
    "audio_id": "d906da31-87cb-42f5-98df-2fc4969923b1",
    "lyric": "[Mandopop, Acoustic Pop]\n[부드러운 여성 보컬, 밝고 쾌활한]\n\n[Verse 1]\n햇살이 바닷가에 내리쬐고\n파도가 환하게 웃고\n너와 내가 해변에\n시계가 멈추고\n아이스크림이 녹아내리고\n손을 잡고 산책하고\n바람이 살랑살랑 불고\n심장이 멈추지 않고 뛰고\n\n[Chorus]\n여름 여름\n시간이 이 하루에 멈춰\n웃음소리가 울려 퍼지고\n푸른 하늘이 곁에 있다",
    "audio_url": "https://storage.googleapis.com/corpusant-app-public/producer/raw/d906da31-87cb-42f5-98df-2fc4969923b1.mp3"
  }
}
```

`data`의 `audio_id` 필드는 업로드 후의 곡 ID입니다.

곡 ID를 얻은 후, 우리는 [Producer Audios Generation API](https://api.xhuoapi.ai/documents/producer-audios-integration)를 사용하여 사용자 정의 곡 생성을 할 수 있습니다. 예를 들어, `action`에 `upload_extend`를 전달하고, `audio_id`에 반환된 곡 ID를 전달하면 참조 오디오에 따라 새로운 곡을 생성할 수 있습니다.
