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

# Get spend for the open billing period

> Recap what the caller's company has accrued in the billing period now open: a `total_cost` plus a per-feature breakdown, highest cost first.

Billing periods are calendar months, so the period runs from `period_start` to the day before `next_period_start` — the date this period's invoice is issued.

The figures come from the same code paths that build the invoice: metered counters (parsing, ingestion, extraction, search, rag) summed over the period, plus `storage` as a peak-based GiB charge net of the free allowance. Two caveats keep this an estimate rather than a promise: usage recorded moments ago may still be settling, and an invoice also sweeps up usage that belongs to an earlier period but only became queryable after that period closed.

Company-wide, not per-user or per-API-key. Free-tier companies are not billed — use `GET /api/v3/credits` for their remaining allowance instead.



## OpenAPI

````yaml /api-reference/openapi-v3.yaml get /api/v3/usage/current-period
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v3)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Agents
    description: Operations about agents
  - name: Threads
    description: Operations about agents conversation threads
  - name: Tools
    description: Operations about native tools
  - name: Models
    description: Operations about AI models
  - name: MCP
    description: Operations about MCP servers
  - name: Sources
    description: Operations about sources used by agents conversation threads
  - name: Artifacts
    description: Operations about artifacts generated by agents conversation threads
  - name: Agent
    description: >-
      Operations about agents (deprecated). Please use the 'Agents' API
      component instead.
  - name: Files
    description: Operations about files
  - name: Facets
    description: Operations about facets
  - name: Tags
    description: Operations about tags
  - name: Workspaces
    description: Operations about workspaces
  - name: Files Processing
    description: Operations about files processing
  - name: Users
    description: Operations about users
  - name: API Keys
    description: Operations about API keys
  - name: User Groups
    description: Operations about user groups
  - name: SCIM
    description: Operations about SCIM
paths:
  /api/v3/usage/current-period:
    get:
      tags:
        - Usage
      summary: Get spend for the open billing period
      description: >-
        Recap what the caller's company has accrued in the billing period now
        open: a `total_cost` plus a per-feature breakdown, highest cost first.


        Billing periods are calendar months, so the period runs from
        `period_start` to the day before `next_period_start` — the date this
        period's invoice is issued.


        The figures come from the same code paths that build the invoice:
        metered counters (parsing, ingestion, extraction, search, rag) summed
        over the period, plus `storage` as a peak-based GiB charge net of the
        free allowance. Two caveats keep this an estimate rather than a promise:
        usage recorded moments ago may still be settling, and an invoice also
        sweeps up usage that belongs to an earlier period but only became
        queryable after that period closed.


        Company-wide, not per-user or per-API-key. Free-tier companies are not
        billed — use `GET /api/v3/credits` for their remaining allowance
        instead.
      operationId: api_v3_usage_current_period_retrieve
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentPeriodSpendResponse'
          description: ''
        '401':
          description: Unauthenticated - missing or invalid API key.
        '503':
          description: >-
            API is under maintenance. Check `GET /api/v3/system/status` for
            active periods and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceMaintenance503'
      security:
        - bearerAuth: []
components:
  schemas:
    CurrentPeriodSpendResponse:
      type: object
      properties:
        currency:
          type: string
          description: ISO 4217 code applied to every cost in the response
        period_start:
          type: string
          format: date
          description: First day of the billing period now open (UTC)
        next_period_start:
          type: string
          format: date
          description: >-
            First day of the next billing period — when this period's invoice is
            issued
        total_cost:
          type: string
          format: decimal
          description: Sum of `by_feature`, in `currency`
        by_feature:
          type: array
          items:
            $ref: '#/components/schemas/FeatureSpendResponse'
          description: >-
            Per-feature breakdown, highest cost first. Features with no usage
            are omitted, so an unused period returns an empty list and a
            `total_cost` of 0
      required:
        - by_feature
        - currency
        - next_period_start
        - period_start
        - total_cost
    ServiceMaintenance503:
      type: object
      description: >-
        Returned by the maintenance middleware when the requested endpoint is
        blocked.
      required:
        - detail
        - error
        - mode
      properties:
        detail:
          type: string
          example: System is under maintenance.
        error:
          type: string
          example: service_maintenance
        mode:
          type: string
          enum:
            - full_shutdown
            - warning_banner
          description: >-
            `full_shutdown` blocks all traffic; `warning_banner` also blocks and
            shows a dismissible toast.
        reason:
          type: string
          description: Operator-supplied maintenance reason, if any.
        started_at:
          type: string
          format: date-time
        endpoint_category_names:
          type: array
          items:
            type: string
          description: >-
            Non-empty only for category-scoped periods. Empty means all
            endpoints are affected.
    FeatureSpendResponse:
      type: object
      properties:
        feature:
          type: string
          description: Feature slug (parsing, ingestion, extraction, search, rag, storage)
        cost:
          type: string
          format: decimal
          description: Cost accrued for this feature in the current billing period
      required:
        - cost
        - feature
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````