Skip to main content
POST
Python

Authorizations

Authorization
string
header
required

Body

multipart/form-data
audio_url
string
required

Input audio URL (supported format: YouTube URL).

Example:

"https://mybucket.s3.amazonaws.com/song.mp3"

prompt
string
required

A description of how the replacement should sound.

Example:

"Replace this part with an opera-style vocal."

replace_start_at
number<float>
required

Time in seconds to start replacing audio.

Example:

12.5

replace_end_at
number<float>
required

Time in seconds to stop replacing audio.

Example:

20

audio_file
file

Uploaded input audio file.

lyrics
string

Lyrics to be used for inpainting.

Example:

"This is where my story begins"

lyrics_section_to_replace
string

Lyrics to be used for the replaced portion(optional, max 3000 characters)

Maximum string length: 2000
gender
enum<string>

Voice style for the inpainted segment.

Available options:
male,
female,
neutral
Example:

"male"

num_outputs
number<integer>

The number of outputs to generate (1 or 2 only):default is 2.

title
string

Title of the generated music track

generate_album_cover
boolean
default:false

Whether to generate an album cover for the generated audio

webhook_url
string

Callback URL for async processing results.

Example:

"https://example.com/webhook"

Response

Successfully initiated inpaint task

success
boolean
message
string
task_id
string
conversion_id_1
string
conversion_id_2
string
eta
integer

Estimated processing time in seconds

credit_estimate
number<float>