> ## 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 30-day usage histogram for the authenticated user

> Return a per-day breakdown of metered usage over the last 30 days (oldest first), including a list-price cost estimate per feature and per day. Days with no usage are returned with an empty `usage` object so the response is dense.

By default the histogram aggregates across every non-revoked API key owned by the authenticated user. Pass `api_key_id` as a query parameter to scope the response to a single key.

**Authorization:** when `api_key_id` is provided, the authenticated user must own that key — the existence of keys belonging to other users is not disclosed.



## OpenAPI

````yaml /api-reference/openapi-v3.yaml get /api/v3/usage
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:
    get:
      tags:
        - Usage
      summary: Get 30-day usage histogram for the authenticated user
      description: >-
        Return a per-day breakdown of metered usage over the last 30 days
        (oldest first), including a list-price cost estimate per feature and per
        day. Days with no usage are returned with an empty `usage` object so the
        response is dense.


        By default the histogram aggregates across every non-revoked API key
        owned by the authenticated user. Pass `api_key_id` as a query parameter
        to scope the response to a single key.


        **Authorization:** when `api_key_id` is provided, the authenticated user
        must own that key — the existence of keys belonging to other users is
        not disclosed.
      operationId: api_v3_usage_retrieve
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageHistogramResponse'
          description: ''
        '401':
          description: Unauthenticated - missing or invalid API key.
        '404':
          description: Not Found - api_key_id not owned by the caller.
        '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:
    UsageHistogramResponse:
      type: object
      properties:
        currency:
          type: string
          description: ISO 4217 code applied to all `price` values in the response
        days:
          type: array
          items:
            $ref: '#/components/schemas/DailyUsageResponse'
          description: One entry per day in the requested window, oldest first
      required:
        - currency
        - days
    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.
    DailyUsageResponse:
      type: object
      properties:
        date:
          type: string
          format: date
        usage:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/FeatureDailyUsageResponse'
          description: >-
            Per-feature usage for the day. Keys are feature slugs (parsing,
            ingestion, search, ...).
      required:
        - date
        - usage
    FeatureDailyUsageResponse:
      type: object
      properties:
        price:
          type: string
          format: decimal
          description: Cost at list price for this feature/day, in the response currency
        metric:
          $ref: '#/components/schemas/FeatureMetricResponse'
      required:
        - metric
        - price
    FeatureMetricResponse:
      type: object
      properties:
        unit:
          type: string
          description: Unit of measurement, e.g. 'page' or 'query'
        count:
          type: number
          format: double
          description: Total quantity recorded for the feature on the day
      required:
        - count
        - unit
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````