Submit a video

Start a recognition job. Submit the video in one of two ways: upload the file directly, or reference a file you already uploaded to S3 with a presigned URL. Either way you get back a job_id to poll for the result.

POST/api/v4/video-recognition/

Request

Send exactly one of file (a direct upload) or storage_key (a file already in S3).

File upload (multipart form data)

Best for small videos. The file is proxied through the API.

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

Reference an uploaded file (JSON body)

Best for large videos. First call Get an upload URL, PUT the file to S3, then submit the returned storage_key here. The bytes never pass through the API.

FieldTypeRequiredDescription
storage_keystringOne of twoThe storage_key returned by Get an upload URL. Must start with video-recognition/.
curl https://api.slipstreammusic.com/api/v4/video-recognition/ \
  -X POST \
  -H "Authorization: Bearer $PARTNER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"storage_key": "video-recognition/8f3c...2a_clip.mp4"}'

Response (201 Created)

{
  "job_id": "7b2c1e8a-0f4d-4a2b-9c11-7f5a2d9e3c10",
  "status": "queued",
  "track": null
}

The track is always null here. Poll GET /api/v4/video-recognition/{job_id}/ until status is completed to get the result.

Recognition runs in the background and usually completes within a few seconds to about a minute, depending on clip length. Poll the job rather than holding the request open.

Errors

HTTPBodyWhen
400{ "detail": "Provide exactly one of \file` or `storage_key`.” }`Neither or both fields were sent.
400{ "file": ["File extension is not allowed..."] }The file is not one of .mp4, .mov, .avi, .mpeg.
400{ "file": ["File size cannot exceed 100 MB."] }The upload is larger than the configured limit.
400{ "storage_key": ["Must start with \video-recognition/`.”] }`The storage_key is not in the recognition namespace.
401 / 403{ "detail": "Authentication credentials were not provided." }Missing or invalid partner key.