> ## 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`를 호출할 필요가 없습니다. 항상 커스텀 모드를 사용하므로 `custom`, `instrumental`, `gpt_description`을 보내지 마세요.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.apimart.ai/v1/music/generations/uploadExtend \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "suno",
      "version": "v6-mini",
      "audio_url": "https://example.com/reference.wav",
      "continue_at": 30,
      "prompt": "[Outro]\nthe next journey, let's walk together",
      "tags": "acoustic pop",
      "duration_s": 60,
      "max_mode": true,
      "audio_format": "mp3"
    }'
  ```

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

  response = requests.post(
      "https://api.apimart.ai/v1/music/generations/uploadExtend",
      headers={"Authorization": "Bearer <token>"},
      json={
          "model": "suno",
          "version": "v6-mini",
          "audio_url": "https://example.com/reference.wav",
          "continue_at": 30,
          "prompt": "[Outro]\nthe next leg of our journey, let's walk together",
          "tags": "acoustic pop",
          "duration_s": 60,
          "max_mode": True,
          "audio_format": "mp3",
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.apimart.ai/v1/music/generations/uploadExtend", {
    method: "POST",
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "suno",
      version: "v6-mini",
      audio_url: "https://example.com/reference.wav",
      continue_at: 30,
      prompt: "[Outro]\nthe next leg of our journey, let's go together",
      tags: "acoustic pop",
      duration_s: 60,
      max_mode: true,
      audio_format: "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="audio_url" type="string" required>
  공개적으로 접근 가능한 오디오 파일의 직접 HTTP(S) URL입니다. 소스 오디오는 8분 미만이어야 합니다. 로컬 경로와 `blob:` URL은 지원하지 않습니다.
</ParamField>

<ParamField body="continue_at" type="number" required>
  연장 시작 시점. 1초 이상이고 소스 오디오의 실제 길이보다 작아야 합니다.
</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="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>
