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