Merge Media
merge_mediaJoin media files end to end, in order, into one file. Pass video_urls to join 2 to 25 videos, or audio_urls to join audio files, not both. Returns a job immediately; check_job returns the permanent URL once it is completed. A failed job is refunded automatically.
Videos cost 2 credits, plus 1 for each clip that needs cropping or padding. The first video sets the canvas unless canvas_video_index names another. video_fit=auto or crop center-crops mismatched clips; pad keeps the full frame with bars; strict refuses different aspect ratios. Clips are never stretched. To join more than 25, join the first 25, then join that result with the rest.
Audio costs 2 credits. Tracks are concatenated as mp3, m4a or wav. crossfade_seconds overlaps adjacent tracks with equal-power fades, and each join shortens the output by that much. normalize_loudness matches each source's loudness first (target_lufs, default -18). One job joins at most 5 files; when more are passed, only the first 5 are joined and check_job returns continuationRequired with nextAudioUrls. Keep the same settings and repeat until no continuation is requested.
To put a soundtrack on a video use add_audio_to_video; to burn on a logo use overlay_images; to build a video from images and clips use stitch_clips.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "merge_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force_new | No | An identical request submitted in the last 10 minutes returns that job without charging again; true generates it again. | |
| pad_color | No | Bar color for video_fit=pad. Default: black. | |
| video_fit | No | How clips of a different shape fit the canvas. Default: auto. | |
| audio_urls | No | Audio files in order. Only the first 5 are joined per job. | |
| target_fps | No | Output frame rate, 1 to 60. Default: the lowest input frame rate. | |
| video_urls | No | 2 to 25 videos in playback order. Pass this or audio_urls. | |
| 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. | |
| target_lufs | No | Audio: target loudness, -30 to -5. Default: -18. | |
| audio_format | No | Audio output. Default: wav for WAV-only inputs, m4a for AAC-only inputs, otherwise mp3. | |
| 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. | |
| crossfade_seconds | No | Audio: overlap each adjacent pair, 0 to 30 seconds. | |
| canvas_video_index | No | Zero-based index of the video that sets the canvas. Default: 0. | |
| normalize_loudness | No | Audio: match each input's loudness before joining. |