sonic

upload and extend music

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

{
  "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

{
  "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

{
  "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.

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

Request body

urlstring 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_modeboolean required

Set to true for custom lyrics mode (requires prompt), or false for AI description mode (requires gpt_description_prompt)

promptstring

Song lyrics. Required when custom_mode is true. Max 5000 chars

gpt_description_promptstring

AI description of the desired music style. Required when custom_mode is false

titlestring

Song title. Max 80 characters

tagsstring

Music style tags. Max 1000 chars

negative_tagsstring

Tags to avoid in the generated music

continue_atnumber

The timestamp (in seconds) from which to continue/extend the song

make_instrumentalboolean

Set to true to generate instrumental music without vocals

style_weightnumber

Style weight between 0 and 1

weirdness_constraintnumber

Weirdness constraint between 0 and 1

vocal_gender'f' | 'm'

Vocal gender: 'f' for female, 'm' for male. Supported on every current model

audio_weightnumber

Audio weight between 0 and 1

auto_concatboolean

When true, automatically concatenate the extended segment with the original song after completion

webhook_urlstring

HTTPS URL to receive webhook notifications when the task completes

webhook_secretstring

Secret key for webhook signature verification

durationinteger

Target song length in seconds. Range 10-360. The generated track lands close to the requested length rather than exactly on it.

Example request

{
  "duration": 120
}

Response

Success

codeinteger required

Response code

messagestring required

Response message

task_idstring required

Task ID for polling the result

Changes

No recorded changes to this operation across all 1 revision of this API.