detach_audio
Detach a video clip's sound into a standalone audio item on an audio track (like "Detach Audio" in desktop NLEs).
When to use
The user wants a video clip's picture and sound as two independently editable timeline items: offset the sound (J/L cuts), keep audio while replacing the picture, apply audio-only trims/fades, or move the sound to a dedicated audio track.
What it does
For each listed video item, atomically:
Inserts a new audio item covering the same timeline range. It plays the same source video's audio track by reference — no file is extracted, and the source's transcript and waveform still apply.
Copies the clip's audio-facing settings (volume, audio fades, playback rate, voice-isolation state) onto the new audio item.
Places it on the first audio track with free space at that range, creating a new audio track if needed.
Marks the video item as detached (
audioDetached), which silences it in preview and export.
The audio item's lifetime is bound to the source video asset: deleting the video asset from the media pool also deletes detached audio items that reference it. Deleting just the video item keeps the audio item.
Body shape
{"items": [{"id": "..."}]}
id: a video timeline item id (short prefix frompreview_timelineaccepted).
Constraints
Only video items whose source has an audio track; fails if the item's audio was already detached.
Locked tracks reject the update with a clear error.
There is no re-attach operation. To undo, delete the created audio item and note the video stays silent (
audioDetachedis not agent-editable).
Return
{"detached": [{"itemId": "<video prefix>", "audioItemId": "<new prefix>", "audioTrackId": "<track prefix>", "createdTrack": false}]}
Examples
Detach one clip:
{"items": [{"id": "abc123"}]}Detach several clips in one atomic call:
{"items": [{"id": "abc123"}, {"id": "def456"}]}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"json": "<json>"
},
"name": "detach_audio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | {"items":[{"id":"..."}]} | |
| projectId | No | Project for this call (full ID or unambiguous prefix). Explicit-timeline calls never change the target of later calls; legacy project selection applies otherwise. | |
| timelineId | No | Timeline id/prefix (from manage_timelines list) holding every listed item. Edits that timeline without switching the active timeline; defaults to the active timeline. |