Skip to main content
POST
Generate Highlights

POST /api/v1/sports/highlights

Start an async task to generate an AI-powered highlight reel from a full-length sports video. Returns a task ID for polling. This is an asynchronous endpoint - use the task ID to poll for results. Note: The system automatically extracts play-by-play metadata from the video unless you supply your own metadata file.

Parameters

Response

Example Request

Example Request (with metadata)

Example Response

How It Works

The system automatically extracts metadata from the video to identify key moments:
  • Scoring plays with precise timestamps
  • Turnovers and possession changes
  • Big plays and exciting moments
  • Crowd reactions and commentary peaks
If you supply your own metadata file, the system will use it instead for even greater accuracy.

Next Step

Poll the task status using GET /api/v1/sports/highlights/{task_id}:

Get Highlights Task

Poll task status and retrieve results

Body

multipart/form-data
video
file
required

Video file (1-2 hours, e.g., full football game)

metadata
file

Optional play metadata JSON file for enhanced accuracy

editorial_instructions
string

Custom instructions for highlight selection

Example:

"Focus on touchdowns and big plays"

duration
integer
default:600

Target duration of the highlight reel in seconds

Example:

600

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"