Prerequisites
Before you begin, you’ll need:- An API key — create and manage keys in the API Dashboard
- An SRT-capable encoder/streaming tool (for SRT ingest), or a reachable HLS manifest
- An input stream that meets the Video Input Requirements
Overview
The Narrative Sports API processes live video and generates highlight clips in your dashboard at app.narrative-sports.com. Choose either:- SRT — push your stream to a URL returned by Narrative.
- HLS — provide a manifest URL for Narrative to pull.
Step 1: Choose a Transport
- SRT
- HLS
Create a task
Narrative returns ansrt_url for your encoder.Stream to Narrative
Point your encoder at the returnedsrt_url and send the stream in real-time (1x speed).With FFmpeg:-c copy requires H.264 / AVC input. For AV1 or VP9, transcode:srt_url.With a hardware encoder: Use TS over SRT in Caller mode, with the host, port, encryption, and passphrase from the returned URL.task_id to look up the generated project and stop the task later.
Pass render_videos.render_video = "ffmpeg" to render and upload clips. OTIO edit data is generated automatically. See Create Task for all options.
The legacy Warmup + Assign Task flow is still supported for backward compatibility, but new integrations should prefer
/create-task.Step 2: Watch Highlights Appear
Head to app.narrative-sports.com and log in to the account associated with the API key. As the stream is processed, highlight clips will appear in your project in real time. You can review, play back, and download clips directly from the dashboard.Step 3: Get the Project ID
Use the task info endpoint to retrieve the generatedproject_id:
task.project_id when creating a game recap or highlight package. If project_id is null, the worker has not linked the project yet; retry GET /tasks/{task_id}/info after the task has started producing project data.
Step 4: Stop the Task
When you’re done, kill the task to stop processing and release the worker. By default this is graceful (the task entersstopping and drains already-submitted renders):
Next Steps
OTIO Format
Get frame-accurate edit points with OpenTimelineIO output
Dashboard
Learn more about the dashboard and project management
Create Highlight Packages
Create packages from project IDs, filters, and selected highlights
API Reference
Full endpoint documentation

