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

# Upload and Extend Audio

> Upload a public audio URL and extend the song from a specified point with Suno V6

<Info>
  This endpoint extends a public audio URL directly, so you do not need to call `uploadTask` first. It always uses custom mode; do not send `custom`, `instrumental`, or `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. Obtain API Key from the [API Key Management page](https://apimart.ai/keys).
</ParamField>

## Body

<ParamField body="model" type="string" default="suno">Always use `suno`.</ParamField>

<ParamField body="audio_url" type="string" required>
  A publicly accessible direct HTTP(S) audio URL. Keep the source audio under 8 minutes. Local paths and `blob:` URLs are not supported.
</ParamField>

<ParamField body="continue_at" type="number" required>
  Extension start time. Must be at least 1 second and strictly less than the source audio's actual duration.
</ParamField>

<ParamField body="version" type="string" default="v6">
  Public version: `v6` / `v6-wild` / `v6-mini`. Defaults to `v6`; omit this field when using `custom_model_id`.
</ParamField>

<ParamField body="custom_model_id" type="string">
  The full UUID returned by the model-creation task. Mutually exclusive with `version` and `persona_id`.
</ParamField>

<ParamField body="prompt" type="string">
  Lyrics for the extension, up to 5,000 characters. If omitted, the extension is treated as instrumental.
</ParamField>

<ParamField body="tags" type="string">Style description, up to 1,000 characters.</ParamField>

<ParamField body="title" type="string">Title, up to 80 characters.</ParamField>

<ParamField body="negative_tags" type="string">Styles to exclude.</ParamField>

<ParamField body="style_weight" type="number">Style weight, from 0 to 1.</ParamField>

<ParamField body="weirdness" type="number">Creativity weight, from 0 to 1.</ParamField>

<ParamField body="audio_weight" type="number">Audio weight, range 0–1. </ParamField>

<ParamField body="auto_lyrics" type="boolean"> Whether to create a second version of the input lyrics. </ParamField>

<ParamField body="vocal_gender" type="string">Gender of voice: `Male` or `Female`. </ParamField>

<ParamField body="persona_id" type="string">Persona ID, mutually exclusive with `custom_model_id`. </ParamField>

<ParamField body="duration_s" type="integer">
  Target generation duration, from 10 to 360 seconds. The actual duration is determined by the task result.
</ParamField>

<ParamField body="variety" type="string">
  Style variation: `off` / `normal` / `high` / `extra` / `max`.
</ParamField>

<ParamField body="max_mode" type="boolean" default="false">
  Enables Max mode and is billed at twice the standard price.
</ParamField>

<ParamField body="audio_format" type="string">Output format: `mp3` / `m4a` / `wav`. </ParamField>.

## Response

<ResponseField name="code" type="integer">Response Status Codes.</ResponseField>

<ResponseField name="data" type="array">
  Submission result. Read from `data[0].task_id` and poll the task query interface.
</ResponseField>

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