---
title: "upload and extend music"
method: POST
path: "/api/v1/sonic/upload-extend"
tags: ["sonic"]
---

# upload and extend music

`POST /api/v1/sonic/upload-extend`

## Request

- Base URL: `https://api.musicapi.ai`
- URL: `https://api.musicapi.ai/api/v1/sonic/upload-extend`
- Auth: HTTP bearer

One-stop API to upload an audio file and extend it with new content. This combines the upload and extend operations into a single request.

**Credits cost: 15**

**Workflow:**
1. Upload the audio file to get a clip_id
2. Extend the uploaded clip with the specified parameters
3. Poll the result using [get-music](get-sonic-music) endpoint with the returned task_id

---

## Polling Result

Use `GET /api/v1/sonic/task/{task_id}` to poll the result.

### Standard Response (auto_concat: false)

```json
{
  "code": 200,
  "data": [
    {
      "clip_id": "ext-clip-1",
      "state": "succeeded",
      "title": "My Song",
      "audio_url": "https://cdn1.suno.ai/ext-clip-1.mp3",
      "duration": 60
    }
  ],
  "message": "success"
}
```

### Auto-Concat Response (auto_concat: true)

When `auto_concat` is enabled, the response contains paired objects:

**Stage 1: Extend completed, concat in progress**
```json
{
  "code": 200,
  "data": [
    {
      "extended": { "clip_id": "ext-clip-1", "state": "succeeded", "duration": 60, ... },
      "full": null
    }
  ],
  "message": "extend completed, concat in progress"
}
```

**Stage 2: Fully completed**
```json
{
  "code": 200,
  "data": [
    {
      "extended": { "clip_id": "ext-clip-1", "state": "succeeded", "duration": 60, ... },
      "full": { "clip_id": "concat-clip-1", "state": "succeeded", "duration": 240, ... }
    }
  ],
  "message": "success"
}
```

The `extended` and `full` fields are paired - each `full` song is the concatenation of the original + corresponding `extended` segment.

## Request body

- object
  - `url` string, required: The online audio URL to upload. Must be a valid audio file URL.Max 8 min.
  - `mv` 'sonic-v6' | 'sonic-v6-wild' | 'sonic-v6-mini', required: Music model version. Suno retired v3.5 through v5.5 on 2026-09-09 and maps every retired id onto v6, so `sonic-v3-5`, `sonic-v4`, `sonic-v4-5`, `sonic-v4-5-plus`, `sonic-v5` and `sonic-v5-5` are still accepted and run v6 — existing integrations need no change.
  - `custom_mode` boolean, required: Set to true for custom lyrics mode (requires prompt), or false for AI description mode (requires gpt_description_prompt)
  - `prompt` string: Song lyrics. Required when custom_mode is true. Max 5000 chars
  - `gpt_description_prompt` string: AI description of the desired music style. Required when custom_mode is false
  - `title` string: Song title. Max 80 characters
  - `tags` string: Music style tags. Max 1000 chars
  - `negative_tags` string: Tags to avoid in the generated music
  - `continue_at` number: The timestamp (in seconds) from which to continue/extend the song
  - `make_instrumental` boolean: Set to true to generate instrumental music without vocals
  - `style_weight` number: Style weight between 0 and 1
  - `weirdness_constraint` number: Weirdness constraint between 0 and 1
  - `vocal_gender` 'f' | 'm': Vocal gender: 'f' for female, 'm' for male. Supported on every current model
  - `audio_weight` number: Audio weight between 0 and 1
  - `auto_concat` boolean: When true, automatically concatenate the extended segment with the original song after completion
  - `webhook_url` string: HTTPS URL to receive webhook notifications when the task completes
  - `webhook_secret` string: Secret key for webhook signature verification
  - `duration` integer: Target song length in seconds. Range 10-360. The generated track lands close to the requested length rather than exactly on it.

## Response `200`

Success

- object
  - `code` integer, required: Response code
  - `message` string, required: Response message
  - `task_id` string, required: Task ID for polling the result
  - `steps` object, required: Step-by-step execution results
    - `upload` object
      - `success` boolean: Whether upload step succeeded
      - `clip_id` string: The clip_id of the uploaded audio
    - `extend` object
      - `success` boolean: Whether extend step succeeded
      - `task_id` string: Task ID for the extend operation

---

[API](https://skmtc.dev/musicapi/apis/musicapi-docs-suno-style-ai-music-generation-api.md) - [All operations](https://skmtc.dev/musicapi/apis/musicapi-docs-suno-style-ai-music-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/musicapi/apis/musicapi-docs-suno-style-ai-music-generation-api/revisions/f94a2c7ed4a1?raw)
