Add music
add_musicPROJECT-SCOPED: this call acts only on the explicit project_id and returns the project identity with its result. Mix music into the edit. The defaults are CONTEXT-AWARE: under speech the track sits low as a bed (-18dB, ducked); when NO speech survives under the window the music is the LEAD audio (-4dB, no ducking) so the user actually hears it. Pass gain_db/duck only to override that. storage_key is an exact key from list_assets(kind='music') — the user's own uploads or a track fetch_url just downloaded — never invent one. Choose from the user's direction, metadata, context and measured get_audio_analysis evidence. start/end are OUTPUT-timeline seconds and DEFAULT TO THE WHOLE VIDEO, so omit them for 'add some music'. Fades in/out by default. loop=true (the default) repeats a short track to fill the span; offset_s starts partway into the track, e.g. to skip a slow intro. Ducking is SMOOTH by default (a sidechain dip that follows the voice; set_music_fit(duck_mode='step') restores the legacy hard -12dB duck).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| duck | No | ||
| loop | No | ||
| start | No | ||
| gain_db | No | ||
| purpose | No | Why this music belongs in this program/window, including the story turn or energy role it supports. | |
| offset_s | No | ||
| fade_in_s | No | ||
| fade_out_s | No | ||
| project_id | Yes | Required immutable scope for this call. Copy the id from list_projects/open_project/project_state; the active-project pointer is never used to guess. | |
| storage_key | Yes |