This endpoint allows users to replace a specific time segment of an audio clip using a textual prompt and optional lyrics. The inpainting operation blends new audio content into the selected range, guided by user-defined style and voice preferences.
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.
π Replace{path_to_your_audio_file}
,api_key
, andwebhook_url
before executing.
Webhook responses include detailed metadata including task_id, conversion_id, audio files (conversion_path), lyrics etc.
prompt
, replace_start_at
, or replace_end_at
, or neither audio_file
nor audio_url
provided.Successfully initiated inpaint task
The response is of type object
.