API Reference
Soundtrack a video
Upload a video

Upload a video

Submit a video for analysis. Either upload a file or pass a YouTube URL. Returns a SoundtrackVideo object you'll use for the rest of the Soundtrack a video flow.

POST/api/v4/soundtrack/video/

Request

You must send exactly one of file or url.

File upload — multipart/form-data

FieldTypeRequiredDescription
filebinaryOne of twoVideo file. Max 60 MB. Allowed extensions: .mov, .mpeg, .mp4, .avi.
curl https://api.slipstreammusic.com/api/v4/soundtrack/video/ \
  -X POST \
  -H "Authorization: Bearer $PARTNER_API_KEY" \
  -F "file=@/path/to/clip.mp4"

YouTube URL — application/json

FieldTypeRequiredDescription
urlstringOne of twoA valid YouTube video URL.
curl https://api.slipstreammusic.com/api/v4/soundtrack/video/ \
  -X POST \
  -H "Authorization: Bearer $PARTNER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'

Response — 201 Created

{
  "id": "8a4b2c1d-9e7f-4a6b-b3c2-1f8d4e5a7c6b",
  "source_type": "file",
  "source_value": "5f3e7d9c8b2a4f1e6d0c5b8a3e2f7d9c",
  "source_title": "clip.mp4",
  "file": "https://media.slipstreammusic.com/.../clip.mp4"
}

See The SoundtrackVideo object for field descriptions.

Hold on to id (used to retrieve or render) and source_value (used to search for matching tracks). Uploaded files expire after a few days; cache the response if your product needs to revisit the same video.

Errors

HTTPBodyWhen
400{ "detail": "Either 'file' or 'url' must be provided." }Neither field was sent.
400{ "detail": "Cannot provide both 'file' and 'url'. Choose one." }Both fields were sent.
400{ "detail": "Please provide a valid YouTube URL." }URL isn't a valid YouTube link.
422{ "detail": "...", "error_code": "..." }The AI couldn't analyze the file (corrupt, no audio, too short). Surface the detail to your user.
500{ "detail": "..." }Internal upload failure. Retry.