Skip to main content
POST
/
api
/
v1
/
generate
/
upload-extend
{
  "defaultParamFlag": true,
  "instrumental": false,
  "prompt": "Extend with brighter chorus and outro",
  "style": "Electropop",
  "title": "Shimmer (Extended)",
  "continueAt": 45,
  "uploadUrl": "https://storage.example.com/upload",
  "model": "V3_5",
  "callBackUrl": "https://example.com/callback",
  "vocalGender": "m",
  "styleWeight": 0.61,
  "weirdnessConstraint": 0.72,
  "audioWeight": 0.65
}
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "5c79****be8e"
  }
}

Parameter Usage Guide

  • When defaultParamFlag is true (Custom Parameters):
    • If instrumental is true: style, title, and uploadUrl are required
    • If instrumental is false: style, prompt, title, and uploadUrl are required
    • Character limits (based on model):
      • V4_5, V4_5PLUS & V5 models: prompt max 5000 characters, style max 1000 characters, title max 100 characters
      • V3_5 & V4 models: prompt max 3000 characters, style max 200 characters, title max 80 characters
    • continueAt: the time point in seconds from which to start extending (must be greater than 0 and less than the uploaded audio duration)
    • uploadUrl: specifies the upload location for audio files; ensure uploaded audio does not exceed 8 minutes.
  • When defaultParamFlag is false (Default Parameters):
    • Regardless of instrumental setting, only uploadUrl and prompt are required
    • Other parameters will use the original audio’s parameters

Optional parameters

The following fields are optional controls available for this endpoint:
  • vocalGender (string): Preferred vocal gender. Allowed values: m (male), f (female)
  • styleWeight (number): Style adherence weight in range 0–1 (recommended two decimals)
  • weirdnessConstraint (number): Creativity/novelty constraint in range 0–1 (recommended two decimals)
  • audioWeight (number): Relative weight of audio consistency in range 0–1 (recommended two decimals)
{
  "defaultParamFlag": true,
  "instrumental": false,
  "prompt": "Extend with brighter chorus and outro",
  "style": "Electropop",
  "title": "Shimmer (Extended)",
  "continueAt": 45,
  "uploadUrl": "https://storage.example.com/upload",
  "model": "V3_5",
  "callBackUrl": "https://example.com/callback",
  "vocalGender": "m",
  "styleWeight": 0.61,
  "weirdnessConstraint": 0.72,
  "audioWeight": 0.65
}

Developer Notes

  1. Generated files will be retained for 14 days
  2. Model version must be consistent with the source music
  3. This feature is ideal for creating longer works by extending existing music
  4. Pay attention to character limits for prompt, style, and title to ensure successful processing
  5. uploadUrl parameter specifies the upload location for audio files; provide a valid URL.

Authorizations

Authorization
string
header
required

🔑 API Authentication

All endpoints require authentication using Bearer Token.

Get API Key

  1. Visit the API Key Management Page to obtain your API Key

Usage

Add to request headers:

Authorization: Bearer YOUR_API_KEY

⚠️ Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately from the management page

Body

application/json
uploadUrl
string<uri>
required

The URL for uploading audio files, required regardless of whether defaultParamFlag is true or false. Ensure the uploaded audio does not exceed 2 minutes in length.

Example:

"https://storage.example.com/upload"

defaultParamFlag
boolean
required

Enable custom mode for advanced audio generation settings.

  • Set to true to use custom parameter mode (requires style, title, and uploadUrl; if instrumental is false, uploadUrl and prompt are required). If instrumental is false, the prompt will be strictly used as lyrics.
  • Set to false to use non-custom mode (only uploadUrl required). Lyrics will be automatically generated based on the prompt.
Example:

true

model
enum<string>
required

The AI model version to use for generation.

  • Required for all requests.
  • Available options:
    • V5: Superior musical expression, faster generation.
    • V4_5PLUS: V4.5+ is richer sound, new waysto create, max 8 min.
    • V4_5: V4.5 is smarter prompts, fastergenerations, max 8 min.
    • V4: V4 is improved vocal quality,max 4 min.
    • V3_5: V3.5 is better song structure,max 4 min.
Available options:
V3_5,
V4,
V4_5,
V4_5PLUS,
V5
Example:

"V3_5"

callBackUrl
string<uri>
required

The URL to receive task completion notifications when upload and extend audio is complete. The callback process has three stages: text (text generation), first (first track complete), complete (all tracks complete). Note: In some cases, text and first stages may be skipped, directly returning complete.

For detailed callback format and implementation guide, see Upload and Extend Audio Callbacks

  • Alternatively, you can use the Get Music Generation Details interface to poll task status
Example:

"https://api.example.com/callback"

instrumental
boolean

Determines whether the audio is instrumental (without lyrics).

  • In custom parameter mode (defaultParamFlag: true):
    • If true: only style, title, and uploadUrl are required.
    • If false: style, title, prompt (prompt will be used as exact lyrics), and uploadUrl are required.
  • In non-custom parameter mode (defaultParamFlag: false): does not affect required fields (only uploadUrl needed). If false, lyrics will be automatically generated.
Example:

true

prompt
string

Description of how the music should be extended. Required when defaultParamFlag is true. Character limits by model:

  • V3_5 & V4: Maximum 3000 characters
  • V4_5, V4_5PLUS & V5: Maximum 5000 characters
Example:

"Extend the music with more relaxing notes"

style
string

Music style, e.g., Jazz, Classical, Electronic. Character limits by model:

  • V3_5 & V4: Maximum 200 characters
  • V4_5, V4_5PLUS & V5: Maximum 1000 characters
Example:

"Classical"

title
string

Music title. Character limits by model:

  • V3_5 & V4: Maximum 80 characters
  • V4_5, V4_5PLUS & V5: Maximum 100 characters
Example:

"Peaceful Piano Extended"

continueAt
number

The time point (in seconds) from which to start extending the music.

  • Required when defaultParamFlag is true.
  • Value range: greater than 0 and less than the total duration of the uploaded audio.
  • Specifies the position in the original track where the extension should begin.
Example:

60

negativeTags
string

Music styles to exclude from generation

Example:

"Relaxing Piano"

vocalGender
enum<string>

Preferred vocal gender. Optional. Allowed values: 'm' (male), 'f' (female).

Available options:
m,
f
Example:

"m"

styleWeight
number

Style adherence weight. Optional. Range: 0-1. Two decimal places recommended.

Required range: 0 <= x <= 1Must be a multiple of 0.01
Example:

0.65

weirdnessConstraint
number

Creativity/novelty constraint. Optional. Range: 0-1. Two decimal places recommended.

Required range: 0 <= x <= 1Must be a multiple of 0.01
Example:

0.65

audioWeight
number

Relative weight of audio consistency versus other controls. Optional. Range: 0-1. Two decimal places recommended.

Required range: 0 <= x <= 1Must be a multiple of 0.01
Example:

0.65

Response

Request successful

code
enum<integer>

Status Codes

  • ✅ 200 - Request successful
  • ⚠️ 400 - Invalid parameters
  • ⚠️ 401 - Unauthorized access
  • ⚠️ 404 - Invalid request method or path
  • ⚠️ 405 - Rate limit exceeded
  • ⚠️ 413 - Theme or prompt too long
  • ⚠️ 429 - Insufficient credits
  • ⚠️ 430 - Your call frequency is too high. Please try again later.
  • ⚠️ 455 - System maintenance
  • ❌ 500 - Server error
Available options:
200,
400,
401,
404,
405,
413,
429,
430,
455,
500
Example:

200

msg
string

Error message when code != 200

Example:

"success"

data
object