Register task
Calling this endpoint registers a task for computing tennis statistics for the provided video denoted by video_url.
POST
/api/statistics/tennisAuthorization
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.
video_urlstringrequiredExample
"https://example.com/video/3cab8744-fd22-4efe-a5f4-9a7fc8ad3716.mp4"processing_windowsarray<object>optionalstart_timenumberoptionalTimestamp in seconds for where to start processing
Example
200stop_timenumberoptionalTimestamp in seconds for where to stop processing
Example
650only_in_rally_databooleanoptionalDefault
falseread_video_from_originbooleanoptionalWhen true (default), the video is read directly from the provided URL. When false, the video is first downloaded to SportAI servers before processing.
Default
trueversionstringoptionalDefault
"stable"Example
"latest"Response Body
Task was successfully created
application/jsondataobjectoptionaltask_idstring<uuid>requiredExample
"52921d5c-eb41-45d6-96a8-f2da5616c717"estimated_compute_timenumberoptionalcurl -X POST "https://example.com/api/statistics/tennis" \ -H "Content-Type: application/json" \ -d '{ "video_url": "https://example.com/video/3cab8744-fd22-4efe-a5f4-9a7fc8ad3716.mp4" }'{ "data": { "task_id": "52921d5c-eb41-45d6-96a8-f2da5616c717", "estimated_compute_time": 0 }}