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

# Buat Model Kustom

> Buat model kustom Suno V6 dari 6–24 klip audio referensi

<Info>
  Pembuatan model bersifat asinkron. Polling tugas dengan `task_id`; setelah selesai, baca ID model dari `data.result.model_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. Dapatkan API Key di [halaman pengelolaan API Key](https://apimart.ai/keys).
</ParamField>

## Body

<ParamField body="model" type="string" default="suno">
  Selalu gunakan `suno`.
</ParamField>

<ParamField body="name" type="string" required>
  Nama model kustom. Tidak boleh kosong setelah spasi awal dan akhir dihapus.
</ParamField>

<ParamField body="audio_urls" type="string[]" required>
  6 hingga 24 URL HTTP(S) audio langsung dan publik. MP3, WAV, serta M4A disarankan. Setiap URL harus mengembalikan file audio langsung, bukan halaman login.
</ParamField>

<Warning>
  Satu file media yang tidak valid dapat menggagalkan seluruh pembuatan model. Unggah file lokal dahulu dan gunakan URL publik; jangan kirim path lokal atau URL `blob:`.
</Warning>

## Response

<ResponseField name="code" type="integer">Kode status respons.</ResponseField>

<ResponseField name="data" type="array">
  Hasil pengiriman. Baca `data[0].task_id` lalu kueri status pelatihan dengan `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>

## Gunakan model yang dibuat

Setelah selesai, simpan `result.model_id`. Gunakan sebagai `custom_model_id` pada permintaan berikutnya dan hilangkan `version` serta `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"
}
```

Pembuatan model dapat memerlukan beberapa menit, bahkan sekitar 20 menit. Ketersediaan dapat berubah; jangan menjanjikan masa berlaku tetap. Pembuatan model dan setiap generasi ditagih terpisah.
