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

# Get estimated usage costs

> Includes the subscription and estimated overage for the current period.



## OpenAPI

````yaml /api-reference/openapi.personal.json get /v1/orgs/{slug}/billing/usage
openapi: 3.1.0
info:
  title: Personal token API
  description: User-scoped API for account and organization management.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - bearer: []
paths:
  /v1/orgs/{slug}/billing/usage:
    get:
      tags:
        - Billing
      summary: Get estimated usage costs
      description: Includes the subscription and estimated overage for the current period.
      operationId: get_usage
      parameters:
        - name: slug
          in: path
          description: Organization slug
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Cost estimate for the current period
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageSummary'
        '401':
          description: Unauthorized
      security:
        - bearer: []
components:
  schemas:
    UsageSummary:
      type: object
      description: Usage summary from the billing provider.
      required:
        - period_start
        - period_end
        - line_items
        - total_cents
      properties:
        daily:
          type: array
          items:
            $ref: '#/components/schemas/UsageDailyPoint'
          description: >-
            Per-day metered quantities for charting. One entry per (day,
            metric).

            Empty when no daily series is available (e.g. provider error).
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/UsageLineItem'
          description: >-
            Period-aggregated breakdown - one entry per billable metric /
            charge.
        period_end:
          type: string
          format: date-time
        period_start:
          type: string
          format: date-time
        projected_spend_cents:
          type: integer
          format: int64
          description: >-
            End-of-period spend projection: `total_cents` linearly extrapolated
            over

            the billing period. Equals `total_cents` when the period can't be

            extrapolated (no future end, or zero elapsed). Never below
            `total_cents`.
        snapshot_storage_gib:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Current managed-snapshot storage (GiB), or `None` when never
            metered.
        storage_gib:
          type:
            - number
            - 'null'
          format: double
          description: Current volume-storage usage (GiB), or `None` when never metered.
        total_cents:
          type: integer
          format: int64
    UsageDailyPoint:
      type: object
      description: |-
        One day's metered quantity for a single billable metric - the unit of a
        usage time-series chart. Cost is intentionally omitted: invoices are
        period-aggregated, so a per-day dollar figure would have to be derived.
      required:
        - date
        - metric
        - quantity
      properties:
        date:
          type: string
          format: date-time
          description: Start of the day window (UTC).
        metric:
          type: string
          description: Billable-metric name this quantity belongs to.
        quantity:
          type: number
          format: double
    UsageLineItem:
      type: object
      description: A single line item in a usage summary.
      required:
        - name
        - quantity
        - unit
        - amount_cents
      properties:
        amount_cents:
          type: integer
          format: int64
        name:
          type: string
        quantity:
          type: number
          format: double
        unit:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        Personal access token (msb_pat_…) or session JWT - the credential an
        agent acts with on a user's behalf.

````