Register task

Two paths for this operation

This operation is available on two paths. /api/statistics/padel is the current one - prefer it for new integrations. The shorter /api/statistics path is kept for backwards compatibility and may be removed in a future release.

Calling this endpoint registers a task for computing statistics for the provided video denoted by video_url.

POST
/api/statistics/padel

Authorization

AuthorizationBearer <token>required

Bearer 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_urlstringrequired
Example"https://example.com/video/3cab8744-fd22-4efe-a5f4-9a7fc8ad3716.mp4"
processing_windowsarray<object>optional
start_timenumberoptional

Timestamp in seconds for where to start processing

Example200
stop_timenumberoptional

Timestamp in seconds for where to stop processing

Example650
only_in_rally_databooleanoptional
Defaultfalse
read_video_from_originbooleanoptional

When true (default), the video is read directly from the provided URL. When false, the video is first downloaded to SportAI servers before processing.

Defaulttrue
versionstringoptional
Default"stable"
Example"latest"

Response Body

Task was successfully created

application/json
dataobjectoptional
task_idstring<uuid>required
Example"52921d5c-eb41-45d6-96a8-f2da5616c717"
estimated_compute_timenumberoptional
curl -X POST "https://example.com/api/statistics/padel" \  -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  }}