Skip to content
AINSOFAPI Get API key

GuidesMusic for a video

Music for a video

Give the video’s length and what it shows. Get up to three tracks, each with the version that fits that exact duration.

MCP toolfind_soundtrackRESTaction: "soundtrack"

Try it

curl https://mcp.ainsof.io/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AINSOF_API_KEY" \
  -d '{"action": "soundtrack", "duration_sec": 30, "description": "a skier racing downhill, fast and bright"}'

What you send

duration_secrequired
number
Video length in seconds.
Greater than 0.
Also accepted as video_seconds
description
string
What the video shows, in musical terms, in English. A description written mostly in a non-Latin script is refused (translate_first).
product
string
What the video is for.
scenes
string[]
Scene descriptions, added to the brief. REST only; not in the MCP tool schema.
cuts_per_min
number
Edit pace. At 30 or more, the brief asks for driving, high-energy music.
has_narration
boolean
true if someone speaks over the video; the brief then asks for underscore.

Good to know

  • The video's description, product, scenes, edit pace and narration are turned into a musical brief; video.read_as shows the brief that was searched.
  • Options that can be heard now come first; among them, options that need no edit come first.
  • When a stock cut is chosen and its preview is confirmed, the option plays that cut: listen_url and audio_url point at it, preview_version names it and full_mix_listen_url keeps the full mix.

Every field it returns, and its errors, in the API Reference