Get video upload URL
Returns presigned URLs for uploading a video directly to S3 and retrieving it for analysis.
Workflow:
- Call this endpoint with the video filename and MIME type
- Use the returned
uploadUrlto upload your video via HTTP PUT directly to S3 - Use the returned
downloadUrlas thevideo_urlparameter when calling analysis endpoints
Important:
- Both URLs expire after 24 hours
- The upload must be completed before the URL expires
- Supported video types: MP4, MOV, AVI, WebM, MKV
- Maximum filename length: 255 characters
/api/video/upload-urlAuthorization
AuthorizationBearer <token>requiredBearer authentication header of the form Bearer <token>, where <token> is your auth token.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
fileNamestringrequiredOriginal file name including extension. Max 255 characters. Must not contain special characters like < > : " / \ | ? *
"match-2024-01-15.mp4"contentTypestringrequiredMIME type of the video file. Supported: video/mp4, video/quicktime (.mov), video/x-msvideo (.avi), video/webm, video/x-matroska (.mkv)
"video/mp4"Response Body
Presigned URLs were successfully generated.
application/jsondataobjectoptionaluploadUrlstringrequiredPresigned PUT URL for direct S3 upload. Valid for 24 hours. Use HTTP PUT with the video file as body and Content-Type header matching the contentType parameter.
downloadUrlstringrequiredPresigned GET URL to pass to analysis endpoints. Valid for 24 hours. Use this URL as the `video_url` parameter when calling analysis endpoints like POST /api/statistics/tennis.
curl -X POST "https://example.com/api/video/upload-url" \ -H "Content-Type: application/json" \ -d '{ "fileName": "match-2024-01-15.mp4", "contentType": "video/mp4" }'{ "data": { "uploadUrl": "string", "downloadUrl": "string" }}