Skip to main content
POST
Extract Metadata

POST /api/v1/sports/extract-metadata

Start an async task to extract structured metadata from video using ROI configuration. Returns a task ID for polling. This is an asynchronous endpoint - use the task ID to poll for results.

Parameters

*Either video or video_url is required.

Response

Example Request

Example Response

Next Step

Poll the task status using GET /api/v1/sports/extract-metadata/{task_id}:

Get Metadata Task

Poll task status and retrieve results

Body

multipart/form-data
roi_config
object
required

ROI configuration from detect-rois endpoint

output_schema
object
required

JSON Schema defining the structure of events to extract

video
file

Video file to process

video_url
string<uri>

Alternative: URL to video file

skip_frames
integer
default:2

Process every Nth frame for faster processing

Example:

2

Response

Task created successfully

task_id
string
required

Unique identifier for the task

Example:

"task_abc123xyz"

status
enum<string>
required

Initial task status

Available options:
pending
Example:

"pending"

created_at
string<date-time>
required

When the task was created

Example:

"2024-01-15T10:30:00Z"