Skip to main content
POST

Parameter Usage Guide

This endpoint supports two modes for specifying the source audio: Mode 1: Replace section using existing audio
  • taskId and audioId are required
  • uploadUrl and model must NOT be provided
Mode 2: Replace section using uploaded custom audio
  • uploadUrl and model are required
  • taskId and audioId must NOT be provided

Common Required Parameters

  • prompt (string, required): Replaced lyrics
  • tags (string, required): Music style tags, such as jazz, electronic, etc.
  • title (string, required): Music title
  • infillStartS (number, required): Start time point for replacement (seconds, 2 decimal places)
  • infillEndS (number, required): End time point for replacement (seconds, 2 decimal places)
  • fullLyrics (string, required): Complete lyrics after modification, combining both modified and unmodified lyrics

Optional Parameters

The following fields are optional controls available for this endpoint:
  • negativeTags (string): Excluded music styles, used to avoid specific style elements in the replacement segment
  • callBackUrl (string): Callback URL for task completion notification. For detailed callback format, see Replace Music Section Callbacks.

Time Range Instructions

  • infillStartS must be less than infillEndS
  • Time values are precise to 2 decimal places, e.g., 10.50 seconds
  • The replacement time range must be between 6 and 60 seconds
  • Replacement duration should not exceed 50% of the original music’s total duration

Developer Notes

  1. Replacement segments will be regenerated based on the provided prompt and tags
  2. Generated replacement segments will automatically blend with the original music’s preceding and following parts
  3. Generated files will be retained for 14 days
  4. Query task status using the same interface as generating music: Get Music Details

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:

⚠️ 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
taskId
string
required

Original task ID (parent task), used to identify the source music for section replacement.

Example:

"2fac****9f72"

audioId
string
required

Unique identifier of the audio track to replace. This ID is returned in the callback data after music generation completes.

Example:

"e231****-****-****-****-****8cadc7dc"

prompt
string
required

Replaced lyrics

Example:

"A calm and relaxing piano track."

tags
string
required

Music style tags, such as jazz, electronic, etc.

Example:

"Jazz"

title
string
required

Music title

Example:

"Relaxing Piano"

infillStartS
number
required

Start time point for replacement (seconds), 2 decimal places. Must be less than infillEndS. The time interval (infillEndS - infillStartS) must be between 6 and 60 seconds.

Required range: x >= 0
Example:

10.5

infillEndS
number
required

End time point for replacement (seconds), 2 decimal places. Must be greater than infillStartS. The time interval (infillEndS - infillStartS) must be between 6 and 60 seconds.

Required range: x >= 0
Example:

20.75

fullLyrics
string
required

Complete lyrics after modification, combining both modified and unmodified lyrics. This parameter contains the full lyrics text that will be used for the entire song after the section replacement.

Example:

"[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics"

negativeTags
string

Excluded music styles, used to avoid specific style elements in the replacement segment

Example:

"Rock"

callBackUrl
string<uri>

Callback URL for task completion. The system will send a POST request to this URL when replacement is complete, containing task status and results.

  • Your callback endpoint should be able to accept POST requests containing JSON payloads with replacement results
  • For detailed callback format and implementation guide, see Replace Music Section Callbacks
  • Alternatively, you can use the get music details interface to poll task status
Example:

"https://example.com/callback"

Callbacks

POST
{request.body#/callBackUrl}audioGenerated

Body

application/json
code
integer

Status code

Example:

200

msg
string

Return message

Example:

"All generated successfully"

data
object

Response

200 - application/json

Callback received successfully

code
enum<integer>

Response status code

  • 200: Success - Request processed successfully
  • 400: Validation error - Lyrics contain copyrighted content.
  • 408: Rate limit exceeded - Timeout.
  • 413: Conflict - Uploaded audio matches existing artwork.
  • 500: Server error - Unexpected error occurred while processing request
  • 501: Audio generation failed.
  • 531: Server error - Sorry, generation failed due to issues. Your credits have been refunded. Please try again.
Available options:
200,
400,
408,
413,
500,
501,
531
msg
string

Error message when code != 200

Example:

"success"

Response

Request successful

code
enum<integer>

Response status code

  • 200: Success - Request processed successfully
  • 401: Unauthorized - Authentication credentials missing or invalid
  • 402: Insufficient credits - Account does not have enough credits to perform this operation
  • 404: Not found - Requested resource or endpoint does not exist
  • 409: Conflict - WAV record already exists
  • 422: Validation error - Request parameters failed validation checks
  • 429: Rate limit exceeded - Exceeded request limit for this resource
  • 451: Unauthorized - Failed to retrieve image. Please verify any access restrictions set by you or your service provider.
  • 455: Service unavailable - System is currently undergoing maintenance
  • 500: Server error - Unexpected error occurred while processing request
Available options:
200,
401,
402,
404,
409,
422,
429,
451,
455,
500
msg
string

Error message when code != 200

Example:

"success"

data
object