> ## 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 a company's spend for the open billing period

> Instance-admin view of `GET /api/v3/usage/current-period` for a specific company: `total_cost` for the billing period now open plus a per-feature breakdown, highest cost first.

Identical payload and identical derivation to the company-facing endpoint — the back-office and the customer's own usage page must never quote different figures.

**Authorization:** the authenticated user must have instance-level company-view permission (SysAdmin, Account Manager, or DPO Admin).



## OpenAPI

````yaml /api-reference/openapi-v3-instance.yaml get /api/v3/instance/companies/{id}/usage/current-period
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v3-instance)
  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: Models
    description: Operations about AI models
  - name: Workspaces
    description: Operations about workspaces
  - name: Users
    description: Operations about users
  - name: User Groups
    description: Operations about user groups
  - name: Companies
    description: Operations about companies
paths:
  /api/v3/instance/companies/{id}/usage/current-period:
    get:
      tags:
        - Usage
      summary: Get a company's spend for the open billing period
      description: >-
        Instance-admin view of `GET /api/v3/usage/current-period` for a specific
        company: `total_cost` for the billing period now open plus a per-feature
        breakdown, highest cost first.


        Identical payload and identical derivation to the company-facing
        endpoint — the back-office and the customer's own usage page must never
        quote different figures.


        **Authorization:** the authenticated user must have instance-level
        company-view permission (SysAdmin, Account Manager, or DPO Admin).
      operationId: api_v3_instance_companies_usage_current_period_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentPeriodSpendResponse'
          description: ''
        '401':
          description: Unauthenticated - missing or invalid API key.
        '403':
          description: Forbidden - instance company-view permission required.
        '404':
          description: Not Found - company does not exist.
        '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.

````