Skip to main content
POST
Replace a section
Operations are enabled individually by server configuration. Disabled operations return 503 without a task. Music credit deduction is currently disabled.

Using this operation

Select a time range within a song and rewrite that section with new lyrics or style.
    1. Prepare the fields shown in the example below. Replace sample URLs and IDs with resources you can access.
    1. Set model to suno_replace_section and place the parameters inside input. Submit once and save the returned task_id.
    1. Query the saved task or receive its callback. A processing result is not a reason to submit the operation again.
  • Read songs from result.data.data. Each song has its own APIstable id, which can be used as audio_id in a later task.

Create task

Send model and input to the common task endpoint. callback_url is an optional top-level public HTTPS address. All resource IDs are APIstable IDs owned by your account. Music credit deduction is currently disabled.

Acceptance response

HTTP 200 confirms acceptance, not completion. Query GET /api/v1/tasks/{task_id} until data.status is succeeded or failed. Read data.result only after success; a failed task has its error in data.message.

Parameter reference

Inputs and limits

The schema lists supported fields, types and basic limits. Also follow Important conditions: cross-field and source-resource checks are not fully represented in JSON Schema. Unknown parameters are rejected. URL fields accept public HTTPS URLs, never file objects.

Important conditions

  • The range must lie inside the source song, be at least 10 seconds, at most 120 seconds and no longer than half the source duration. Start/end accept at most two decimal places. prompt remains required; lyrics only overrides the replacement-segment lyrics. full_lyrics is the complete intended song text.
  • Persona-based replacement is not enabled. Requests containing persona_id return HTTP 422/code 42201.
  • full_song/mixed results wait for assembly; segment/stem returns the requested part. An assembly failure is not reported as a complete song. Partial song success is identified by the result message.
  • Song audio may be MP3 or M4A. Use suno_export_mp3 for an actual MP3 file. Unavailable optional cover art may be null; audio remains usable.
  • Uploaded files last 24 hours, generated files 14 days and task details 30 days. Reused files keep their original expiry. Valid Voice/Persona identity mappings are separate from task-log cleanup. Download files you need to retain.

Result schema

The creation response is {code:200,msg:“success”,data:{task_id}}. Poll GET /api/v1/tasks/{task_id}. On success, data.result is an object matching the schema below; it is otherwise null. input remains a JSON string.
Song duration is in seconds; task duration is in milliseconds. createTime is a Unix timestamp in milliseconds or null. Current stream_audio_url and source_stream_audio_url are null. source_audio_url/source_image_url refer to the same APIstable-hosted copies as audio_url/image_url, not provider links. Process the actual song array; upload registration does not imply two newly generated songs.
Voice: all four steps File uploads Callbacks

Authorizations

Authorization
string
header
required

Every valid key can submit and query its own account. Revoked keys are rejected.

Body

application/json
model
enum<string>
required
Available options:
suno_replace_section
Example:

"suno_replace_section"

input
object
required
callback_url
string<uri>

Optional public HTTPS endpoint for signed completion callbacks; no redirects or private IPs.

Response

Accepted task. Poll the common task endpoint or use callback_url.

code
any
required
msg
any
required
data
object
required