Replace the segment between starts_at and ends_at of a previously generated or uploaded clip with new content. Surrounding sections are preserved.Auto-refund: if the upstream replace fails, the 12-credit charge is automatically refunded.
This operation replaced the legacy Producer replace endpoint in 2026-04. The old starts / ends parameters are still accepted but you should prefer starts_at / ends_at and the new instruction field.
Request
Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired
Examples
{"task_type":"replace_music","clip_id":"abc123xyz789","starts_at":30,"ends_at":45,"instruction":"Replace this segment with a heavy distorted guitar riff over double-bass drums and aggressive energy"}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl--location--request POST 'https://api.musicapi.ai/api/v1/producer/create' \
--header'Authorization: Bearer <token>' \
--header'Content-Type: application/json' \
--data-raw'{
"task_type": "replace_music",
"clip_id": "abc123xyz789",
"starts_at": 30,
"ends_at": 45,
"instruction": "Replace this segment with a heavy distorted guitar riff over double-bass drums and aggressive energy"
}'
Responses
🟢200
application/json
Task accepted. Poll GET /api/v1/producer/task/{task_id} for the result.