Peer Quality Stats

Peer Quality Stats API provides time-series quality metrics for a specific peer in a session. Use this to analyze publishing and subscribing performance, including bitrate, packet loss, FPS, round-trip time, and more.

This is useful for debugging call quality issues, monitoring network conditions, and building custom quality dashboards.

This API is not real-time. Quality stats data is only available after the session has ended.
GEThttps://api.100ms.live/v2/analytics/peer-stats
curl --location --request GET \ 'https://api.100ms.live/v2/analytics/peer-stats?peer_id=<peer_id>&session_id=<session_id>' \ --header 'Authorization: Bearer <management_token>'

Query Parameters

NameTypeDescriptionRequired
peer_idstringUnique identifier of the peer/participantyes
session_idstringUnique identifier of the sessionyes

Response Object

AttributeTypeDescription
peer_idstringUnique identifier of the peer
session_idstringUnique identifier of the session
room_idstringUnique identifier of the room
publisherobjectContains video and audio arrays with publish-side metrics
subscriberobjectContains video and audio arrays with subscribe-side metrics

Publisher Video Object

AttributeTypeDescription
track_idstringUUID of the track
typestringTrack type: regular or screen
ridstring | nullSimulcast layer: h (high), m (medium), l (low), or null
time_seriesobjectTime-series metrics for the track

Publisher video time_series fields:

FieldTypeDescription
timestampsnumber[]Unix timestamps in milliseconds
bitratenumber[]Bitrate in bits per second
fpsnumber[]Frames per second
packet_loss_percentnumber[]Packet loss as a percentage
rtt_msnumber[]Round-trip time in milliseconds

Publisher Audio Object

AttributeTypeDescription
track_idstringUUID of the track
time_seriesobjectTime-series metrics for the track

Publisher audio time_series fields:

FieldTypeDescription
timestampsnumber[]Unix timestamps in milliseconds
bitratenumber[]Bitrate in bits per second
packet_loss_percentnumber[]Packet loss as a percentage
rtt_msnumber[]Round-trip time in milliseconds
jitter_msnumber[]Jitter in milliseconds

Subscriber Video Object

AttributeTypeDescription
track_idstringUUID of the track
typestringTrack type: regular or screen
time_seriesobjectTime-series metrics for the track

Subscriber video time_series fields:

FieldTypeDescription
timestampsnumber[]Unix timestamps in milliseconds
bitratenumber|null[]Bitrate in bits per second, or null
fpsnumber[]Frames per second
freeze_countnumber[]Number of video freezes

Subscriber Audio Object

AttributeTypeDescription
track_idstringUUID of the track
time_seriesobjectTime-series metrics for the track

Subscriber audio time_series fields:

FieldTypeDescription
timestampsnumber[]Unix timestamps in milliseconds
bitratenumber|null[]Bitrate in bits per second, or null
concealed_samplesnumber[]Number of concealed (interpolated) samples
packet_loss_percentnumber[]Packet loss as a percentage
RESPONSE
Status: 200 OK
{ "peer_id": "1169b4b7-68c2-4d39-8568-5618433958ac", "session_id": "6977b3f3cdd1e423f8b2cxxx", "room_id": "6977b3f3cdd1e423f8b2xxxx", "publisher": { "video": [ { "track_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "type": "regular", "rid": "h", "time_series": { "timestamps": [1738843560000, 1738843570000], "bitrate": [2500000, 2480000], "fps": [30, 30], "packet_loss_percent": [0.3, 0.2], "rtt_ms": [45, 47] } }, { "track_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "type": "regular", "rid": "m", "time_series": { "timestamps": [1738843560000], "bitrate": [1200000], "fps": [30], "packet_loss_percent": [0.15], "rtt_ms": [45] } }, { "track_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "type": "screen", "rid": null, "time_series": { "timestamps": [1738843560000], "bitrate": [800000], "fps": [5], "packet_loss_percent": [0.1], "rtt_ms": [46] } } ], "audio": [ { "track_id": "c3d4e5f6-a7b8-9012-cdef-123456789012", "time_series": { "timestamps": [1738843560000], "bitrate": [64000], "packet_loss_percent": [0.1], "rtt_ms": [45], "jitter_ms": [2.1] } } ] }, "subscriber": { "video": [ { "track_id": "4334da7c-1d73-4e19-9d63-4b0571f5acd4", "type": "regular", "time_series": { "timestamps": [1738843560000], "bitrate": [null], "fps": [15], "freeze_count": [0] } } ], "audio": [ { "track_id": "fbc9c8f8-70ea-4d24-9699-12bf3eba94d8", "time_series": { "timestamps": [1738843560000], "bitrate": [null], "concealed_samples": [0], "packet_loss_percent": [0.2] } } ] } }

Notes

  • Authentication: Requires a management token in the Authorization: Bearer <token> header.
  • Empty Data: Arrays will be empty [] if no data is available for a given metric.
  • Simulcast: For publisher video tracks, the same track_id may appear multiple times with different rid values (h/m/l) representing different simulcast quality layers.

Postman collection

You can use our Postman collection to start exploring 100ms APIs.

Run in Postman

Refer to the Postman guide to get started with 100ms API collection.


Have a suggestion? Recommend changes ->

Run in postman

Was this helpful?

1234