GuidesCut to a length
Cut to a length
Ask for 7, 15 or 45 seconds and get the same track at the nearest musical length: its own opening, whole bars joined where both sides sound alike, and its real ending. Never stretched, never faded mid phrase.

MCP toolfit_to_lengthRESTaction: "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": 15}'What you send
track_idrequiredstring
Cue id or title.
secondsrequirednumber
Target length (for
kind: "video", the video's length). Rounded to 0.1.kindstring
length, video or loop. Case-insensitive.hit_atnumber
Second at which the cue's climax should land. Rounded to 0.01.
stemsboolean
Also cut every stem at the same points.
versionstring
Version to cut from. Upper-cased.
Good to know
kind: "length"returns the nearest musical length (a 5-second request may come back at 6 to 8 seconds);videoreturns exactlyseconds;loopreturns a seamless loop of whole bars close toseconds.hit_atplaces the cue's climax on that second.- Listening (
listen_url) needs nothing.download_urlopens 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
