Add Audio To Video
add_audio_to_videoPut a new audio track, such as narration from generate_speech or music from generate_music, on a video. Costs 2 credits. Returns a job immediately; check_job returns the permanent URL once it is completed. A failed job is refunded automatically.
audio_mode=replace (default) discards the video's own audio, including dialogue and ambience, and the output ends at the shorter of the video and the new audio. audio_mode=mix keeps the video's audio and layers audio_url over it, and the output keeps the video's full length; original_volume and added_volume (0 to 1) set each track's gain, with about 0.3 keeping music under dialogue. start_offset delays the new audio. To let the added audio run past the end of the video, use stitch_clips with that one video clip plus audio.
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": {
"video_url": "<video_url>",
"audio_url": "<audio_url>"
},
"name": "add_audio_to_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_url | Yes | Audio to add, such as narration or music. | |
| force_new | No | An identical request submitted in the last 10 minutes returns that job without charging again; true generates it again. | |
| video_url | Yes | Video to put the audio on. | |
| audio_mode | No | Default: replace. | |
| skills_used | No | Optional workflow analytics: names of the skills (or skill/reference paths) followed for this call. Stored with generation jobs only. Never include private data, local paths or media URLs. | |
| added_volume | No | With mix: gain of audio_url, 0 to 1. Default: 1. | |
| start_offset | No | Seconds after the video starts when the audio begins. Default: 0. | |
| budget_project | No | Optional budget project this generation's cost counts toward, for tracking spend per client or job. Pass its slug; an id or the exact display name also works. Create one with create_budget_project and find slugs with list_budget_projects. An unknown project never stops the generation: it runs without one, and the result warns how to add it with assign_to_budget_project. | |
| original_volume | No | With mix: gain of the video's own audio, 0 to 1. Default: 1. |