Inpaint an Audio Segment
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.
To use the inpaint feature, upload a song and specify the lyrics you want to replace in the field 'lyrics_section_to_replace'. For best results, also provide the complete song lyrics in the lyrics.
post/v1/inpaint
Request
- Base URLhttps://api.musicgpt.com/api/public
- AuthAPI key in header Authorization
Request body multipart/form-data
Example request
{
"audio_url": "https://mybucket.s3.amazonaws.com/song.mp3",
"prompt": "Replace this part with an opera-style vocal.",
"replace_start_at": 12.5,
"replace_end_at": 20,
"lyrics": "This is where my story begins",
"gender": "male",
"webhook_url": "https://example.com/webhook"
}Response
Successfully initiated inpaint task
Example response
{
"success": true,
"message": "Inpaint request submitted successfully",
"task_id": "task-xyz-123",
"conversion_id_1": "inpaint-abc",
"conversion_id_2": "inpaint-def",
"eta": 40,
"credit_estimate": 45
}Changes
No recorded changes to this operation across all 1 revision of this API.