---
title: "Get usage analytics"
method: GET
path: "/billing/usage"
tags: ["billing"]
---

# Get usage analytics

`GET /billing/usage`

## Query parameters

- `period` 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR'

## Response `200`

Successful response.

- UsageAnalytics — 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)
    - `credits` integer, required
    - `date` string, date-time, required
    - `minutes` integer, required
    - `sessions` integer, required
  - `byQuality` object[], required — Breakdown by stream quality tier
    - `credits` integer, required
    - `minutes` integer, required
    - `quality` string, required
  - `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

## Other responses

- `401` — Missing or invalid access token.
- `403` — The token lacks the required scope or access to the resource.
- `404` — The resource does not exist or is not visible to the caller.
- `422` — The request body or parameters are invalid.
- `429` — Rate limit exceeded. Retry after the indicated delay.
- `502` — The upstream data service returned an error.

---

[API](https://skmtc.dev/streamloop/apis/streamloop-api.md) · [All operations](https://skmtc.dev/streamloop/apis/streamloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/streamloop/streamloop-api/revisions/7f30ccbac1b1/schema)
