Viewer-hours and bytes per day and per stream, and this month's spend
From the relay's session records (UTC days, a session counted on the day it ended; viewer sessions under 10 s are bytes but not viewer-hours). At most 92 days a call.
From the relay's session records (UTC days, a session counted on the day it ended; viewer sessions under 10 s are bytes but not viewer-hours). At most 92 days a call.
secretKeyAuthorizationBearer <token>sk_...
from?stringfirst day (UTC); default: the 1st of this month
dateto?stringlast day (UTC); default: today
datestream?stringone stream only
usage
application/json- response
tenant?stringfrom?stringto?stringdays?array<>total?month?curl -X GET 'https://api.nearglass.com/v1/usage?from=2026-10-01&to=2026-10-31&stream=st_8f2c41d09a7be3105c6e2d77'{ "tenant": "string", "from": "string", "to": "string", "days": [ { "viewer_hours": 0, "gib": 0, "bytes": 0, "sessions": 0, "viewer_sessions": 0, "moq": { "viewer_hours": 0, "viewer_sessions": 0, "bytes": 0 }, "hls": { "viewer_hours": 0, "viewer_sessions": 0, "bytes": 0 }, "date": "string", "streams": [ { "viewer_hours": 0, "gib": 0, "bytes": 0, "sessions": 0, "viewer_sessions": 0, "moq": { "viewer_hours": 0, "viewer_sessions": 0, "bytes": 0 }, "hls": { "viewer_hours": 0, "viewer_sessions": 0, "bytes": 0 }, "stream": "string", "namespace": "string" } ] } ], "total": { "viewer_hours": 0, "gib": 0, "bytes": 0, "sessions": 0, "viewer_sessions": 0, "moq": { "viewer_hours": 0, "viewer_sessions": 0, "bytes": 0 }, "hls": { "viewer_hours": 0, "viewer_sessions": 0, "bytes": 0 } }, "month": { "month": "string", "viewer_hours": 0, "gib": 0, "bytes": 0, "free_viewer_hours": 0, "free_gib": 0, "prices": { "per_gib_usd": 0, "per_viewer_hour_usd": 0 }, "spend_usd": 0, "spend_cap_usd": 0, "percent_of_cap": 0, "cap_reached": true, "alerts": [ { "percent": 50, "at": "2019-08-24T14:15:22Z" } ] }}Set your monthly spending cap or webhook PATCH
`spend_cap_usd` up to the tenant's `limits.max_spend_cap_usd`. At the cap, new viewers are refused (402 `spend_cap_reached`) and viewers already in keep watching; alerts go out at 50, 80 and 100 %. A new cap re-arms the alerts. Setting `webhook_url` answers a new `webhook_secret` once; `null` removes the webhook. Name and limits are the operator's (403).
The public status, as JSON GET
Regions and their relays (state, CPU and memory shares, viewers), the overall state (`up`, `degraded`, `down`) and the recent relay incidents. No URLs, scopes or tenants.