POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/sonilo-video-to-video"; const data = {}; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


video_urlstr *

Public HTTP(S) URL of the source MP4/MOV video to score. Use a clean, video-only clip.


sound_typestr ( default: music_and_sfx )

Which audio to generate: music, sfx, or both. Use music_and_sfx for a full showcase.


music_promptstr ( default: cinematic ambient orchestral score, gentle swelling strings, ethereal and uplifting, evoking the vastness of the ocean at golden sunset )

Optional text steering the score's mood, genre, and instruments. Leave empty to auto-match the video.


sfx_promptstr ( default: ocean waves crashing on rocks, sea spray, distant seabirds calling, coastal wind )

Optional text guiding sound effects for sfx or music_and_sfx modes. Match on-screen action.


preserve_speechbool ( default: 1 )

Keeps original dialogue and vocals, mixing music beneath. Enable for talking-head or interview clips.


duckingbool ( default: true )

Auto-lowers music under speech in music_and_sfx mode. Keep true when dialogue must stay clear.


sfx_segmentslist ( default: )

Contiguous timed SFX prompts; the first must start at 0. Leave empty for automatic placement.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Sonilo Video to Video — AI Video-to-Music & Sound Effects Scoring

What is Sonilo Video to Video?

Sonilo Video to Video is a video-native AI scoring model that generates an original soundtrack directly from your footage and returns a new MP4 with the audio muxed in. Instead of searching stock libraries or writing genre prompts, it reads the video's pacing, motion, scene changes, and emotional arc, then composes music, places sound effects, or builds a combined music-and-SFX mix that follows the cut. The generated audio matches the exact video length with a natural ending rather than an abrupt loop, so short-form ads, trailers, explainers, product demos, game clips, and social videos feel professionally scored in a single API call.

Key Features

  • Frame-synced, cut-aware scoring generated from the video itself — the prompt is optional.
  • Three modes via sound_type: music, sfx (frame-accurate Foley and ambience), or music_and_sfx.
  • preserve_speech keeps original dialogue and vocals; ducking automatically lowers music under speech.
  • sfx_segments lets you place contiguous, timed sound-effect prompts across the timeline.
  • music_prompt and sfx_prompt steer mood, genre, and on-screen action when you want control.
  • Returns the original video muxed with a ready-to-publish stereo soundtrack.

Best Use Cases

Use Sonilo Video to Video for short-form content where timing misses are obvious: ad cutdowns, product reveals, drone and travel edits, fitness tutorials, game highlights, and UGC. In testing, music_and_sfx reliably blended cinematic ambient music with matched environmental effects (waves, wind, birds) on a five-second clip, delivering a clean, non-clipping stereo mix. For talking-head clips, vlogs, and interviews, enable preserve_speech so narration stays intact while music sits underneath.

Prompt Tips and Output Quality

Prompt in production language, not just genre terms: describe the emotional arc and the ending, such as build after the intro, leave room for voice-over, or resolve on the final frame. Keep source clips focused and, ideally, video-only. music_and_sfx is the strongest showcase mode because it runs both pipelines. Output audio length tracks the video duration automatically.

FAQs

Does it require a text prompt? No. Prompts are optional; the video drives the score.

Can I keep my narration? Yes — enable preserve_speech (voice only) with ducking.

What input format is best? A clean MP4/MOV, ideally without existing audio.

What does it return? A new MP4 with the generated soundtrack muxed in.

Which mode should I start with? music_and_sfx for a full, mixed result.