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

# Get the account's plan limits and usage, plus the last three closed months

> Read-only usage for the signed-in account. Each meter reports `used`,
`included` (`null` when the plan has no limit), `remaining` (never
negative) and `percent` (`null` when there is no limit). `processed_hours`
comes from the upload ledger, so it is never a made-up number. No price
is returned; this endpoint reports usage and limits only.




## OpenAPI

````yaml /api/openapi.yaml get /v1/usage/summary
openapi: 3.1.0
info:
  title: segmnt API
  version: 0.19.19
  summary: >-
    Video infrastructure. Upload through one API and we encode, store, secure
    and stream it on your own domain.
  description: |
    The segmnt API contract. It can change while we build it.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
  contact:
    name: segmnt engineering
servers:
  - url: https://api.segmnt.cloud
    description: Production
security:
  - apiKey: []
  - session: []
tags:
  - name: Auth
    description: |
      SSO sign-in for the dashboard. No passwords are stored. Sign-in is a
      browser redirect flow: `/auth/{provider}/start` → the provider →
      `/auth/{provider}/callback`, which sets the `segmnt_session` cookie.
      Launch providers: Google and GitHub. Apple and Reddit come later.
  - name: Projects
    description: >
      How many projects an account can have depends on its plan: Free and

      Starter 1, Pro and Pilot (by invitation) 3, Agency 25. Agencies use one
      project per client.
  - name: API keys
    description: Server-side keys. Each key belongs to one project.
  - name: Domains
    description: >-
      Sites allowed to play the project's videos. A domain must be verified with
      a DNS TXT record.
  - name: Uploads
    description: Direct upload from the client to storage with pre-signed multipart URLs.
  - name: Upload tokens
    description: |
      Short-lived, single-use tokens for uploading from a browser. Your server
      mints one with the project API key; the browser uses it for exactly one
      upload and never sees the key.
  - name: Videos
    description: Uploaded videos and their processing status.
  - name: Playback
    description: Signed playback tokens.
  - name: Demo
    description: |
      The public marketing `/demo` page. It fetches a fresh, short-lived
      playback token on load so the page holds no key and no long-lived token.
      No authentication; one protected demo video, fixed by configuration.
  - name: Webhooks
    description: |
      HTTPS endpoints that receive video events. To test, register your own
      receiver and upload a short video.
  - name: Usage
    description: Stored and watched time.
  - name: Billing
    description: Plans, checkout and the paid-plan whitelist.
  - name: System
    description: Health check.
paths:
  /v1/usage/summary:
    get:
      tags:
        - Billing
      summary: >-
        Get the account's plan limits and usage, plus the last three closed
        months
      description: >
        Read-only usage for the signed-in account. Each meter reports `used`,

        `included` (`null` when the plan has no limit), `remaining` (never

        negative) and `percent` (`null` when there is no limit).
        `processed_hours`

        comes from the upload ledger, so it is never a made-up number. No price

        is returned; this endpoint reports usage and limits only.
      operationId: getUsageSummary
      responses:
        '200':
          description: Current usage summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageSummary'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - session: []
components:
  schemas:
    UsageSummary:
      type: object
      required:
        - plan
        - period
        - meters
        - payAsYouGo
        - history
      properties:
        plan:
          type: object
          required:
            - id
            - name
            - status
          properties:
            id:
              $ref: '#/components/schemas/PlanId'
            name:
              type: string
            status:
              type: string
              enum:
                - active
                - pilot
                - past_due
                - canceled
        period:
          type: object
          required:
            - start
            - end
          properties:
            start:
              $ref: '#/components/schemas/Timestamp'
            end:
              $ref: '#/components/schemas/Timestamp'
        meters:
          type: array
          description: One entry per meter, always in the same order.
          items:
            $ref: '#/components/schemas/UsageMeter'
        payAsYouGo:
          type: object
          required:
            - enabled
            - cap
            - planSupportsIt
          properties:
            enabled:
              type: boolean
              description: |
                True when watch time past the included minutes is billed
                pay-as-you-go (Pro and Agency, when no pilot is active).
            cap:
              type:
                - integer
                - 'null'
              description: |
                Watched minutes at which playback stops. `null` when
                pay-as-you-go is active (no hard stop), otherwise the plan's
                included minutes.
            planSupportsIt:
              type: boolean
              description: |
                True when the plan can pay-as-you-go at all (Pro and Agency),
                even if a pilot currently turns it off.
        history:
          type: array
          description: The last three closed UTC months, oldest first.
          minItems: 3
          maxItems: 3
          items:
            type: object
            required:
              - period
              - used
            properties:
              period:
                type: object
                required:
                  - start
                  - end
                properties:
                  start:
                    $ref: '#/components/schemas/Timestamp'
                  end:
                    $ref: '#/components/schemas/Timestamp'
              used:
                type: object
                required:
                  - upload_hours
                  - processed_hours
                  - stored_hours
                  - watched_minutes
                properties:
                  upload_hours:
                    type: number
                  processed_hours:
                    type: number
                  stored_hours:
                    type: number
                    description: >-
                      Reconstructed from when each video was created and (if
                      ever) deleted. A video that later moves to `failed` drops
                      out of past months.
                  watched_minutes:
                    type: number
    PlanId:
      type: string
      description: >-
        Plan names and prices are subject to change. Examples are not real
        plans.
      examples:
        - free
    Timestamp:
      type: string
      format: date-time
    UsageMeter:
      type: object
      required:
        - meter
        - unit
        - used
        - included
        - remaining
        - percent
      properties:
        meter:
          type: string
          enum:
            - upload_hours
            - processed_hours
            - stored_hours
            - watched_minutes
        unit:
          type: string
          enum:
            - hours
            - minutes
        used:
          type: number
        included:
          type:
            - number
            - 'null'
          description: >-
            The plan's allowance for this meter, or `null` when there is no
            limit.
        remaining:
          type:
            - number
            - 'null'
          description: >-
            Never negative; `0` once the meter is at or over its limit. `null`
            when there is no limit.
        percent:
          type:
            - number
            - 'null'
          description: |
            `used / included * 100`, rounded to two decimals. Can exceed `100`
            on pay-as-you-go overage. `null` when there is no limit.
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - code
      properties:
        type:
          type: string
          format: uri-reference
        title:
          type: string
        status:
          type: integer
        code:
          type: string
          description: Stable error code for programs.
          examples:
            - plan_limit_reached
        detail:
          type: string
        limit:
          type: string
          description: >
            From the API. On `403 plan_limit_reached`, the plan limit that was
            hit,

            for example `monthly_uploads_cap`. The playback CDN does not send
            this

            field for a blocked or over-limit project. It does send it for
            `quality`

            and `white_label` refusals.
  responses:
    Unauthorized:
      description: Missing or wrong API key or session.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Project API key. Server-side only.
    session:
      type: apiKey
      in: cookie
      name: segmnt_session
      description: Dashboard session cookie, set after SSO sign-in.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.