Inpaint audio segment (sync)
Replace a specific segment of an audio clip with AI-generated content using text conditioning only. The surrounding audio is preserved. The replaceable region must start at least 1s after the file start and be 1–8s wide; it may extend to the end of the file (no tail restriction). Long inputs are windowed (≤10s to the model) and reassembled to full length via FFmpeg. Credits are charged only for the replaced segment duration. For video-guided inpainting, use /v2/inpaint-audio/with_video/v1.6.
Request
- Base URL: https://api.mirelo.ai
- URL: https://api.mirelo.ai/v2/inpaint-audio/v1.6/sync
- Auth: HTTP bearer
Headers
Stable key for one logical sync request, for retrying after an ambiguous response such as a transport timeout. Reuse it only with the identical body. While the original request is in progress, after it completed, or with a different body, the retry returns 409 idempotency_conflict instead of starting another billable request. A failed attempt may run again with the same key. A completed request's key is remembered for 24 to 48 hours after the original request completes, depending on when the daily sweep runs. A 409 retry does not extend this window; reusing the key after it is forgotten starts and bills a new request.
Request body
Example request
{
"audio": {
"type": "url",
"audio_url": "https://example.com/my-sfx.wav"
},
"segment": {
"start_ms": 2000,
"end_ms": 4000
},
"num_samples": 1
}Response
Inpainted audio URLs
Changes
No recorded changes to this operation across all 1 revision of this API.