Add audio track
add_audioAdd a music track or sound effect that plays as a project-level audio layer over all clips. Does NOT consume a clip slot. Use this for background music or a soundtrack that should play under the existing timeline. Sound for an HTML animation goes here, not in its page: guide_start_time = the element's start + the cue's t. (For inserting an audio file as its own sequential clip with auto-transcription, use add_clips(kind='video') with an audio mime_type instead.)
type="music": requires src.
srcis thesrcfrom a find(type='music') result (pass with its name and duration as source_duration), or an upload: an mcp_upload_id (mup_) from upload_file or a Clueso upload_id, whose name and duration are filled in for you. For a Freesound result thesrcis an opaque handle; pass it through unchanged and Clueso downloads + hosts the original server-side (do not try to fetch it yourself). Anything not from find has its duration probed. Optional: guide_start_time, guide_end_time, music_start_time, music_end_time (trim the source track), volume, loop, fade_in, fade_out. A user's own upload is also saved to the project's media panel (saved_to_media_panel).type="sfx": pass the
src,name, andsource_durationfrom a find(type='sfx') result (or an upload assrc), plus guide_start_time (Freesoundsrcis an opaque handle, resolved server-side just like music). Optional: volume. (Legacy: a fixed-librarysfx_keylike 'whoosh' still works instead of src.)
Concurrency: whole-project mutation (conflict domain: the entire project) — serialize; do not run in parallel with ANY other mutation on the same project_id (including element/voiceover edits). Size your clips BEFORE calling add_audio, or pass guide_end_time explicitly — the default ('end of project') is captured at call time and will NOT auto-extend if clips are added or resized afterwards.
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": {
"project_id": "<project_id>",
"type": "<type>"
},
"name": "add_audio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| src | No | Audio source. For type='music' (required) or a stock type='sfx': the `src` from a find(type='music'|'sfx') result (may be an opaque Freesound handle — pass as-is), or an upload id (mcp_upload_id 'mup_…' or a Clueso upload_id). Not needed for legacy fixed-library sfx (use sfx_key). | |
| loop | No | Loop the track if project is longer than the source. Music only. (default: false) | |
| name | No | Track/effect name. From the find result; for an upload it defaults to the file name. | |
| type | Yes | Audio type: 'music' or 'sfx' | |
| volume | No | Volume as percent (0–100). Default: 20 for music (under narration), 80 for sfx. | |
| fade_in | No | Fade-in duration in seconds. Music only. (default: 0.5) | |
| sfx_key | No | LEGACY fixed-library SFX key (e.g. 'whoosh', 'pop', 'click'). Optional alternative to src for type='sfx'. Prefer the src/name/source_duration from a find(type='sfx') result. | |
| fade_out | No | Fade-out duration in seconds. Music only. (default: 0.5) | |
| project_id | Yes | The project ID | |
| guide_end_time | No | When to stop playing (seconds). Music only. Default = end of project AT CALL TIME — captured once at insert and NOT recomputed when clips are later added or resized. Pass an explicit value (e.g. the intended final project duration) when adding audio before clips are sized. | |
| music_end_time | No | Out-point within the SOURCE track (seconds) — trims where playback ends in the music file. Music only. Default = source_duration. | |
| source_duration | No | Source duration in seconds, from the find result. Uploads and other URLs are probed. | |
| guide_start_time | No | When to start playing in the guide timeline (seconds). Required for type='sfx', optional for music (default 0). | |
| music_start_time | No | In-point within the SOURCE track (seconds) — trims where playback begins in the music file. Music only. Default 0 (start of source). |