Skip to main content
GET
/
billing
/
usage
Get usage analytics
curl --request GET \
  --url https://api.streamloop.app/v1/billing/usage \
  --header 'Authorization: Bearer <token>'
{
  "buckets": [
    {
      "credits": 123,
      "date": "2023-11-07T05:31:56Z",
      "minutes": 123,
      "sessions": 123
    }
  ],
  "byQuality": [
    {
      "credits": 123,
      "minutes": 123,
      "quality": "<string>"
    }
  ],
  "sessionCount": 123,
  "totalCredits": 123,
  "totalMinutes": 123
}

Authorizations

Authorization
string
header
required

OAuth 2.1 authorization-code flow with PKCE.

Query Parameters

period
enum<string>
default:QUARTER

Aggregation window.

Available options:
DAY,
WEEK,
MONTH,
QUARTER,
YEAR

Response

Successful response.

Aggregated usage analytics with time-bucketed data. Granularity depends on the period: DAY -> hourly buckets WEEK, MONTH -> daily buckets QUARTER, YEAR -> monthly buckets

buckets
object[]
required

Time-bucketed usage (hourly, daily, or monthly depending on period)

byQuality
object[]
required

Breakdown by stream quality tier

sessionCount
integer
required

Number of streaming sessions in the requested period

totalCredits
integer
required

Total credits spent in the requested period

totalMinutes
integer
required

Total minutes in the requested period