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
- prompt length limit by model:
- V3_5 & V4: Maximum 3000 characters
- V4_5, V4_5PLUS & V5: Maximum 5000 characters
- style length limit by model:
- V3_5 & V4: Maximum 200 characters
- V4_5, V4_5PLUS & V5: Maximum 1000 characters
- title length limit by model:
- V3_5 & V4: Maximum 80 characters
- V4_5, V4_5PLUS & V5: Maximum 100 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
Developer Notes
- Generated files will be retained for 14 days
- Model version must be consistent with the source music
- This feature is ideal for creating longer works by extending existing music
- uploadUrl parameter specifies the upload location for audio files; provide a valid URL.
Authorizations
🔑 API Authentication
All endpoints require authentication using Bearer Token.
Get API Key
- 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
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.
"https://storage.example.com/upload"
Enable custom mode for advanced audio generation settings.
- Set to
trueto use custom parameter mode (requiresstyle,title, anduploadUrl; ifinstrumentalisfalse,uploadUrlandpromptare required). Ifinstrumentalisfalse, the prompt will be strictly used as lyrics. - Set to
falseto use non-custom mode (onlyuploadUrlrequired). Lyrics will be automatically generated based on the prompt.
true
Model version to use, must be consistent with the source audio
V3_5, V4, V4_5, V4_5PLUS, V5 "V3_5"
The URL to receive task completion notifications when music extension is complete.
For detailed callback format and implementation guide, see Upload and Extend Audio Callbacks
- Alternatively, you can use the get music generation details endpoint to poll task status
"https://api.example.com/callback"
Determines whether the audio is instrumental (without lyrics).
- In custom parameter mode (
defaultParamFlag: true):- If
true: onlystyle,title, anduploadUrlare required. - If
false:style,title,prompt(promptwill be used as exact lyrics), anduploadUrlare required.
- If
- In non-custom parameter mode (
defaultParamFlag: false): does not affect required fields (onlyuploadUrlneeded). Iffalse, lyrics will be automatically generated.
true
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
"Extend the music with more relaxing notes"
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
"Classical"
Music title. Character limits by model:
- V3_5 & V4: Maximum 80 characters
- V4_5, V4_5PLUS & V5: Maximum 100 characters
"Peaceful Piano Extended"
The time point (in seconds) from which to start extending the music.
- Required when
defaultParamFlagistrue. - 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.
60
Music styles to exclude from generation
"Relaxing Piano"
Preferred vocal gender for generated vocals. Optional.
m, f "m"
Weight of the provided style guidance. Range 0.00–1.00.
0 <= x <= 1Must be a multiple of 0.010.65
Constraint on creative deviation/novelty. Range 0.00–1.00.
0 <= x <= 1Must be a multiple of 0.010.65
Weight of the input audio influence (where applicable). Range 0.00–1.00.
0 <= x <= 1Must be a multiple of 0.010.65
Response
Request successful
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
200, 400, 401, 404, 405, 413, 429, 430, 455, 500 200
Error message when code != 200
"success"
