Skip to content
AINSOFAPI Get API key

GuidesCut to a moment

Cut to a moment

hit_at lands the track’s peak on the second you name, for a reveal or a logo. The build plays into it and the real ending follows.

MCP toolfit_to_length (hit_at)RESTaction: "fit"

Try it

curl https://mcp.ainsof.io/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AINSOF_API_KEY" \
  -d '{"action": "fit", "track_id": "AIN-CAT 030_001", "seconds": 30, "hit_at": 21.5}'

What you send

track_idrequired
string
Cue id or title.
Also accepted as title
secondsrequired
number
Target length (for kind: "video", the video's length). Rounded to 0.1.
1 to 300.
kind
string
length, video or loop. Case-insensitive.
Default: length
Allowed: length, video, loop
hit_at
number
Second at which the cue's climax should land. Rounded to 0.01.
0 or more and less than seconds; not allowed with loop.
stems
boolean
Also cut every stem at the same points.
Default: false
Only with version MAIN.
version
string
Version to cut from. Upper-cased.
Default: MAIN
Letters, digits and underscores, up to 32 characters.

Good to know

  • kind: "length" returns the nearest musical length (a 5-second request may come back at 6 to 8 seconds); video returns exactly seconds; loop returns a seamless loop of whole bars close to seconds. hit_at places the cue's climax on that second.
  • Listening (listen_url) needs nothing. download_url opens ainsof.io, which asks the person to sign in (Google or email) before the zip downloads. Edits are kept for 7 days.
  • An identical request within 15 minutes returns the same edit. Each caller (key, or address when anonymous) can have two edits in progress.

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