> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myustadia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing Report

> Monthly billing report for this API client.

The authoritative usage view is `quota_seconds`: the seconds bucket. Fields:
`quota_seconds`, `consumed_seconds`, `remaining_seconds`, `percent_consumed`
(0-100, the figure to show the client), `over_quota` (true when the account
is at or below the start floor; new generations and preset creation are
blocked), `unlimited` (true when the account has no quota cap at all --
distinct from a quota of 0, which means the account is fully blocked pending
subscription and reads `percent_consumed: 100`, `over_quota: True`).
Use `percent_consumed` / `remaining_seconds` to show how much the client has left.

Also returns the course `summary` and the per-external_ref `breakdown_by_ref`.

Example:
    GET /api/v1/billing?month=2026-04



## OpenAPI

````yaml /openapi.yaml get /api/v1/billing
openapi: 3.1.0
info:
  title: Mahara Platform
  description: >
    AI Sales Training Course Generator, a Coursera-style platform.


    ## Authentication


    Every request must carry your API key as a Bearer token:


    `Authorization: Bearer sk_live_your_key_here`


    ## Getting an API key


    API keys are provisioned by our team. They are not self-service, so there is
    no signup page to apply on. To request access, email **sales@myustadia.com**
    and we will issue a key for your account.
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/billing:
    get:
      tags:
        - Billing
      summary: Billing Report
      description: >-
        Monthly billing report for this API client.


        The authoritative usage view is `quota_seconds`: the seconds bucket.
        Fields:

        `quota_seconds`, `consumed_seconds`, `remaining_seconds`,
        `percent_consumed`

        (0-100, the figure to show the client), `over_quota` (true when the
        account

        is at or below the start floor; new generations and preset creation are

        blocked), `unlimited` (true when the account has no quota cap at all --

        distinct from a quota of 0, which means the account is fully blocked
        pending

        subscription and reads `percent_consumed: 100`, `over_quota: True`).

        Use `percent_consumed` / `remaining_seconds` to show how much the client
        has left.


        Also returns the course `summary` and the per-external_ref
        `breakdown_by_ref`.


        Example:
            GET /api/v1/billing?month=2026-04
      operationId: billing_report_api_v1_billing_get
      parameters:
        - name: month
          in: query
          required: false
          schema:
            type: string
            description: Month in YYYY-MM format. Defaults to current month.
            examples:
              - 2026-04
            title: Month
          description: Month in YYYY-MM format. Defaults to current month.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                month: 2026-06
                client_id: acme_corp
                summary:
                  courses_total: 12
                  courses_ready: 11
                  courses_partial: 0
                  courses_error: 1
                  distinct_external_refs: 5
                  total_modules: 48
                quota_seconds:
                  quota_seconds: 7200
                  consumed_seconds: 3428
                  remaining_seconds: 3772
                  percent_consumed: 48
                  over_quota: false
                  unlimited: false
                breakdown_by_ref:
                  - external_ref: acme-emea
                    courses: 3
                    courses_ready: 3
                    modules: 12
                note: >-
                  quota_seconds.percent_consumed is the authoritative usage
                  figure.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````