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

# 오디오 업로드 및 커버 생성

> 공개 오디오 URL을 업로드하고 Suno V6로 커버를 생성합니다

<Info>
  이 엔드포인트는 공개 오디오 URL에서 직접 커버를 만들므로 먼저 `uploadTask`를 호출할 필요가 없습니다. `task_id`가 반환되며 `GET /v1/music/tasks/{task_id}`를 폴링해 결과를 가져옵니다.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.apimart.ai/v1/music/generations/uploadCover \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "suno",
      "version": "v6",
      "audio_url": "https://example.com/reference.mp3",
      "custom": true,
      "instrumental": true,
      "tags": "piano, ambient",
      "duration_s": 120,
      "variety": "normal",
      "audio_format": "m4a"
    }'
  ```

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

  response = requests.post(
      "https://api.apimart.ai/v1/music/generations/uploadCover",
      headers={"Authorization": "Bearer <token>"},
      json={
          "model": "suno",
          "version": "v6",
          "audio_url": "https://example.com/reference.mp3",
          "custom": True,
          "instrumental": True,
          "tags": "piano, ambient",
          "duration_s": 120,
          "audio_format": "m4a",
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.apimart.ai/v1/music/generations/uploadCover", {
    method: "POST",
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "suno",
      version: "v6",
      audio_url: "https://example.com/reference.mp3",
      custom: true,
      instrumental: true,
      tags: "piano, ambient",
      duration_s: 120,
      audio_format: "m4a"
    })
  });
  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="audio_url" type="string" required>
  공개적으로 접근 가능한 오디오 파일의 직접 HTTP(S) URL입니다. 소스 오디오는 8분 미만이어야 합니다. 로컬 경로, `blob:` URL, 로그인이 필요한 링크는 지원하지 않습니다.
</ParamField>

<ParamField body="version" type="string" default="v6">
  공개 버전: `v6` / `v6-wild` / `v6-mini`. 기본값은 `v6`이며 `custom_model_id` 사용 시 생략하세요.
</ParamField>

<ParamField body="custom_model_id" type="string">
  모델 생성 작업이 반환한 전체 UUID. `version` 및 `persona_id`와 함께 사용할 수 없습니다.
</ParamField>

<ParamField body="custom" type="boolean">
  이 필드는 명시적으로 보내세요. `false`이면 `gpt_description`, `true`이면 가사와 스타일 필드를 사용합니다.
</ParamField>

<ParamField body="instrumental" type="boolean" default="false">
  연주곡을 생성할지 여부. `custom=true`이고 이 필드가 `false`이면 `prompt`가 필수입니다.
</ParamField>

<ParamField body="gpt_description" type="string">
  영감 설명. `custom=false`일 때 필수이며 최대 3,000자입니다.
</ParamField>

<ParamField body="prompt" type="string">
  커스텀 가사, 최대 5,000자.
</ParamField>

<ParamField body="tags" type="string">
  스타일 설명, 최대 1,000자.
</ParamField>

<ParamField body="title" type="string">
  제목, 최대 80자.
</ParamField>

<ParamField body="negative_tags" type="string">
  제외할 스타일.
</ParamField>

<ParamField body="style_weight" type="number">
  스타일 가중치, 0\~1.
</ParamField>

<ParamField body="weirdness" type="number">
  창의성 가중치, 0\~1.
</ParamField>

<ParamField body="audio_weight" type="number">
  오디오 가중치, 0\~1.
</ParamField>

<ParamField body="auto_lyrics" type="boolean">
  입력 가사를 창의적으로 다시 쓸지 여부.
</ParamField>

<ParamField body="vocal_gender" type="string">
  보컬 성별: `Male` / `Female`.
</ParamField>

<ParamField body="persona_id" type="string">
  Persona ID. `custom_model_id`와 함께 사용할 수 없습니다.
</ParamField>

<ParamField body="duration_s" type="integer">
  목표 생성 길이, 10\~360초. 커스텀 모드에서만 사용할 수 있습니다.
</ParamField>

<ParamField body="variety" type="string">
  스타일 변화: `off` / `normal` / `high` / `extra` / `max`.
</ParamField>

<ParamField body="max_mode" type="boolean" default="false">
  Max 모드를 활성화합니다. 커스텀 모드가 필요하며 일반 가격의 2배로 청구됩니다.
</ParamField>

<ParamField body="audio_format" type="string">
  출력 형식: `mp3` / `m4a` / `wav`.
</ParamField>

## Response

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

<ResponseField name="data" type="array">
  제출 결과. `data[0].task_id`를 읽고 작업 조회 API를 폴링하세요.
</ResponseField>

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