Endpoint
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
audio_file | UploadFile | Optional | Upload the input audio file. Required if audio_url is not provided. |
audio_url | String | Optional | Public/S3/YouTube URL of the input audio. Required if audio_file is not provided. |
prompt | String | Required | Prompt describing how the replacement should sound. Example: “Replace this part with an opera-style vocal.” |
replace_start_at | Float | Required | Start time (in seconds) of the segment to replace. |
replace_end_at | Float | Required | End time (in seconds) of the segment to replace. |
lyrics | String | Optional | Optional lyrics to use for inpainting. |
gender | String | Optional | Voice style for vocal generation. One of: male , female , neutral . |
webhook_url | String | Optional | Callback URL for async response. |
💡 Note: You must provide eitheraudio_file
oraudio_url
— at least one is required.
Sample Output
Listen to a real output: Prompt: inpaint from 60 to 120 seconds in classical slow vibe - audio input : Moana How Far We will Go. Download AudioTry it Yourself
Visit the Inpaint Endpoint Explorer to test the endpoint — set your payload, hit send, and view the generated results.Sample Request
cURL
Python
🔐 Replace{path_to_your_audio_file}
,api_key
, andwebhook_url
before executing.
Sample Response
Success (200 OK)
Webhook Delivery
Once the generation is complete, webhooks will be triggered to deliver the following:Standard Requests (non-instrumental):
- 2 (webhooks) x Remix conversion details (one per version)
- 2 (webhooks) x Lyrics with timestamp data
Webhook responses include detailed metadata including task_id, conversion_id, audio files (conversion_path), lyrics etc.
Common Errors
- 422 Unprocessable Entity: Missing required fields like
prompt
,replace_start_at
, orreplace_end_at
, or neitheraudio_file
noraudio_url
provided. - 500 Internal Server Error: An unexpected error occurred during processing.
The response provides a downloadable or streamable inpainted audio file.
Payload and Request Formation
Authorizations
Body
URL or S3 path to the input audio.
"https://mybucket.s3.amazonaws.com/song.mp3"
A description of how the replacement should sound.
"Replace this part with an opera-style vocal."
Time in seconds to start replacing audio.
12.5
Time in seconds to stop replacing audio.
20
Uploaded input audio file.
Lyrics to be used for inpainting.
2000
"This is where my story begins"
Voice style for the inpainted segment.
male
, female
, neutral
"male"
Callback URL for async processing results.
"https://example.com/webhook"