Add audio overlay
add_audio_overlayAdd an audio overlay (mp3/m4a/wav/ogg) scheduled at a frame-aligned start. The asset must already be uploaded (upload_audio, or the editor for a file from the person's disk); pass the upload's returned filename, and its name as the track's label. 30 fps; convert seconds with frames = round(s * 30). Plays in the editor preview and is mixed into the MP4 export.
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": {
"filename": "<filename>",
"startFrame": "<startFrame>",
"projectId": "<projectId>"
},
"name": "add_audio_overlay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gain | No | Linear gain 0..2. Default 1. | |
| name | No | Optional label people see on the track: pass the upload's returned `name`. | |
| endFrame | No | Optional end frame; omit to play the asset's full natural length from startFrame. | |
| filename | Yes | The stored audio filename an upload returned. | |
| projectId | Yes | Opaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates. | |
| startFrame | Yes | Frame at which the overlay starts (0-indexed, 30 fps). | |
| fadeInFrames | No | Linear fade-in length in frames. Default 0. | |
| fadeOutFrames | No | Linear fade-out length in frames. Default 0. | |
| sourceLayerId | No | Optional video layer element id ("video.<id>") to weld this overlay to. When set, the editor renders the overlay as a waveform footer on that clip and drags it with the clip instead of showing a standalone bottom row. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The payload, shaped by the tool. | |
| note | No | What to do next when not ready. | |
| error | No | Why it failed. | |
| status | No | For cache-backed readers: whether the answer was ready. | |
| editorUrl | No | Opens this project in the editor. |