Remove element, group or audio track
remove_from_projectRemove an element, a group or an audio track from a project.
target="element": removes an element (requires element_id, or element_ids for several). clip_index is optional — the element is located by id; pass it only as a hint
target="group": removes a GROUP node (requires clip_index + group_id). By default its children survive — they rise to the removed group's own parent, which for a top-level group is the clip root. Pass keep_children=false to delete the whole subtree instead, every nested group and every element inside it.
target="audio": removes a music/SFX track (requires music_id — returned by add_audio)
Concurrency: target='element' is element-scoped (conflict domain: the individual element) — parallel-safe with other element edits on different elements, same as remove_elements. target='audio' is a whole-project mutation — serialize it against any other mutation on the same project_id. (Mutations to different projects run in parallel freely.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | What to remove: 'element', 'group' or 'audio' | |
| group_id | No | Group ID to remove (required for target='group') | |
| music_id | No | Music/SFX track ID to remove (required for target='audio') | |
| clip_index | No | Zero-based clip index. Required for target='group'; for target='element' an optional hint — the element is found by id either way | |
| element_id | No | Element ID to remove (target='element'; or use element_ids) | |
| project_id | Yes | The project ID | |
| element_ids | No | Several element IDs to remove (target='element'). Removed one at a time, so a failure part-way leaves the earlier ones removed; retrying the same list is safe — ids already gone come back as already_absent. For a large batch prefer remove_elements, which lands in one save | |
| keep_children | No | target='group' only. Omit/true ungroups: children rise to the removed group's own parent. false deletes the whole subtree. |