OverviewGuidesAPI Reference
Log inSign up
OverviewGuidesAPI Reference
Sign upLogin
Getting started with
Live stream with the API
Track stream usage and duration
Live stream with the dashboard
Your account

How to track stream usage and duration

If you are operating a live-streaming or user generated content platform, you will want to know the the total duration of the "parent" stream object and the duration of a "child" stream session.

GET /stream/{id} to retrieve a stream object or a session stream object

Stream sessions are a type of stream object. Use the same GET /stream/{id} request to retieve any type of stream object, whether it be a parent object or a child-session object.

curl -H 'authorization: Bearer {api-key}' \


The value of sourceSegmentsDuration returned is the duration in seconds of the asset source processed by On the parent object, this value equates to the total amount of source video ingested by all time. On the child-session object, this value is the length of the live stream session (and session recording). Learn more about the stream object in the API reference.

{other asset object keys, like profiles}

Next, learn Next, learn how to list all stream objects.
  • Company
  • Home
  • Contact
  • Team
  • Jobs
  • Livepeer, Inc.
  • 223 Bedford Ave PMB 530
    Brooklyn, NY 11211
  • [email protected]