Generate a music-scored video (video output)
video_to_video_musicGenerate an original licensed score for a video and return a new video with the music mixed in, not just an audio file. Provide a local path or URL; the source video's audio is removed by default.
Instructions
Generate an original score for a video and return a NEW VIDEO with the music muxed in (not just an audio file). Provide either a local video path or a public video URL. Generation is asynchronous; this tool waits for completion and returns the saved video path. Tracks are fully licensed (via Shutterstock) and cleared for commercial use.
By default the returned video's audio is the generated music ALONE — the source video's own audio is removed. Pass keep_original_sound=True to keep the whole source track with the music statically mixed under it, adding ducking=True to dip the music under the voice instead; or preserve_speech=True to keep only the isolated speech. The source picture is copied without re-encoding, so the input must carry H.264, H.265/HEVC, VP9 or AV1 video in an mp4, mov, m4v or webm container — animated gif and VP8 webm are rejected.
⚠️ COST WARNING: This tool makes an API call to Sonilo which may incur charges. Only use when explicitly requested by the user.
Args: video_path (str, optional): Absolute local path, or relative to SONILO_MCP_BASE_PATH. Subject to the account upload cap. Maximum video duration is 360 seconds (6 minutes). video_url (str, optional): HTTPS URL to a video file. prompt (str, optional): Style hint for the generated music. segments (list[dict], optional): How the music should develop over time, as [{"start": float, "prompt": str, "label": str}, ...]. The first start must be 0, starts must be at least 5 seconds apart, and label is one of intro/verse/pre-chorus/chorus/bridge/break/silence/outro/none. Supplying these skips the plan the backend would otherwise derive from prompt. keep_original_sound (bool, optional): Keep the source video's whole original audio track in the result, with the generated music combined under it. Defaults to False, so by default the returned video's audio is the generated music alone. Supersedes preserve_speech. ducking (bool, optional): How the voice and the generated music are COMBINED — not whether a voice is kept. Default False, matching the backend: a static voice-forward mix at a fixed offset. Pass True for the dynamic duck, where the music dips only while the voice is present. Has no effect when there is no voice source, i.e. neither keep_original_sound nor preserve_speech is set. Free and best-effort: silently falls back to generated-audio-only if the source has no usable audio track, voice isolation fails, or the mix fails. preserve_speech (bool, optional): Keep only the source's ISOLATED speech (not the whole track) in the output. Defaults to False. Superseded by keep_original_sound. variants_num (int, optional): 1-10, default 1. Generate this many distinct video variants in one request, each scored with its own creative direction. Cost scales linearly with N. Values above 1 are never covered by the free trial — even a trial account is billed for variants beyond the first. prompt_influence (float, optional): 0-1, API default 0.5. Sets how strongly the generated music follows the prompt; omit it unless the user asks for stricter or looser prompt adherence. Free. output_directory (str, optional): Where to save the result. Defaults to SONILO_MCP_BASE_PATH.
Exactly one of video_path and video_url must be provided.
Returns: TextContent with the saved .mp4 path. At variants_num > 1, one TextContent per variant, saved as -0.mp4, -1.mp4, ... On timeout the error message includes the task_id — recover with get_sfx_task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | ||
| ducking | No | ||
| segments | No | ||
| video_url | No | ||
| video_path | No | ||
| variants_num | No | ||
| preserve_speech | No | ||
| output_directory | No | ||
| prompt_influence | No | ||
| keep_original_sound | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |