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

# 사용자 지정 모델 생성

> 6~24개의 참조 오디오 클립으로 Suno V6 사용자 지정 모델을 생성합니다

<Info>
  모델 생성은 비동기입니다. 제출 후 `task_id`로 작업을 폴링하고 완료되면 `data.result.model_id`에서 커스텀 모델 ID를 읽으세요.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.apimart.ai/v1/music/generations/createModel \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "suno",
      "name": "warm folk model",
      "audio_urls": [
        "https://example.com/ref-01.mp3",
        "https://example.com/ref-02.mp3",
        "https://example.com/ref-03.wav",
        "https://example.com/ref-04.m4a",
        "https://example.com/ref-05.mp3",
        "https://example.com/ref-06.mp3"
      ]
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.apimart.ai/v1/music/generations/createModel",
      headers={"Authorization": "Bearer <token>"},
      json={
          "model": "suno",
          "name": "warm folk model",
          "audio_urls": [
              "https://example.com/ref-01.mp3",
              "https://example.com/ref-02.mp3",
              "https://example.com/ref-03.wav",
              "https://example.com/ref-04.m4a",
              "https://example.com/ref-05.mp3",
              "https://example.com/ref-06.mp3",
          ],
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.apimart.ai/v1/music/generations/createModel", {
    method: "POST",
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "suno",
      name: "warm folk model",
      audio_urls: [
        "https://example.com/ref-01.mp3",
        "https://example.com/ref-02.mp3",
        "https://example.com/ref-03.wav",
        "https://example.com/ref-04.m4a",
        "https://example.com/ref-05.mp3",
        "https://example.com/ref-06.mp3"
      ]
    })
  });
  console.log(await response.json());
  ```
</RequestExample>

## Authorizations

<ParamField header="Authorization" type="string" required>
  Bearer Token. [API Key 관리 페이지](https://apimart.ai/keys)에서 API Key를 받으세요.
</ParamField>

## Body

<ParamField body="model" type="string" default="suno">
  항상 `suno`를 사용합니다.
</ParamField>

<ParamField body="name" type="string" required>
  커스텀 모델 이름. 앞뒤 공백을 제거한 뒤 비어 있으면 안 됩니다.
</ParamField>

<ParamField body="audio_urls" type="string[]" required>
  공개적으로 접근 가능한 직접 HTTP(S) 오디오 URL 6\~24개입니다. MP3, WAV, M4A를 권장합니다. 각 URL은 로그인 페이지가 아니라 오디오 파일을 직접 반환해야 합니다.
</ParamField>

<Warning>
  잘못된 미디어 파일 하나로 전체 모델 생성 작업이 실패할 수 있습니다. 로컬 파일을 먼저 업로드해 공개 URL을 사용하고 로컬 경로나 `blob:` URL은 보내지 마세요.
</Warning>

## Response

<ResponseField name="code" type="integer">응답 상태 코드.</ResponseField>

<ResponseField name="data" type="array">
  제출 결과. `data[0].task_id`를 읽고 `GET /v1/music/tasks/{task_id}`로 학습 상태를 조회하세요.
</ResponseField>

<ResponseExample>
  ```json submitted theme={null}
  {
    "code": 200,
    "data": [
      {"status": "submitted", "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"}
    ]
  }
  ```

  ```json completed theme={null}
  {
    "code": 200,
    "data": {
      "id": "task_01M24YMN4EV04M84R5QYM77R1E",
      "status": "completed",
      "progress": 100,
      "result": {
        "model_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "name": "warm folk music model"
      }
    }
  }
  ```
</ResponseExample>

## 생성한 모델 사용

완료 후 `result.model_id`를 저장합니다. 이후 커스텀 모델 요청에서 이를 `custom_model_id`로 사용하고 `version`과 `persona_id`는 생략하세요.

```json theme={null}
{
  "model": "suno",
  "custom_model_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "custom": true,
  "instrumental": false,
  "prompt": "[Verse]\nan old wooden guitar plays a new journey",
  "style": "acoustic folk, warm vocals",
  "max_mode": true,
  "audio_format": "mp3"
}
```

모델 생성은 몇 분, 경우에 따라 약 20분이 걸릴 수 있습니다. 커스텀 모델 사용 가능 기간은 달라질 수 있으므로 고정 만료 시간을 약속하지 마세요. 모델 생성과 각 생성 요청은 별도로 과금됩니다.
