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

# Get usage

> Per-user, per-model token usage for an inference ``kind``.

Owners and admins see every member; a plain member sees only their own
rows. Prompt and completion tokens are folded into one row per (user,
model). Reads raw metered events from Croesus, so it covers all history and
is independent of the billing ledger; ``deployment_id`` identifies the model.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/external/orgs/{slug}/usage
openapi: 3.1.0
info:
  title: Lyceum Cloud API
  version: 0.1.0
servers:
  - url: https://api.lyceum.technology
    description: Production
security:
  - bearerAuth: []
paths:
  /api/v2/external/orgs/{slug}/usage:
    get:
      tags:
        - Billing
      summary: Get usage
      description: >-
        Per-user, per-model token usage for an inference ``kind``.


        Owners and admins see every member; a plain member sees only their own

        rows. Prompt and completion tokens are folded into one row per (user,

        model). Reads raw metered events from Croesus, so it covers all history
        and

        is independent of the billing ledger; ``deployment_id`` identifies the
        model.
      operationId: get_org_usage_api_v2_external_orgs__slug__usage_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: kind
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/UsageKind'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgUsageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UsageKind:
      type: string
      enum:
        - inference
        - serverless_inference
      title: UsageKind
      description: Which inference service to report per-user token usage for.
    OrgUsageResponse:
      properties:
        kind:
          $ref: '#/components/schemas/UsageKind'
        rows:
          items:
            $ref: '#/components/schemas/OrgUsageRow'
          type: array
          title: Rows
      type: object
      required:
        - kind
        - rows
      title: OrgUsageResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OrgUsageRow:
      properties:
        user_id:
          type: string
          title: User Id
        deployment_id:
          type: string
          title: Deployment Id
        prompt_tokens:
          type: integer
          title: Prompt Tokens
        completion_tokens:
          type: integer
          title: Completion Tokens
        total_tokens:
          type: integer
          title: Total Tokens
      type: object
      required:
        - user_id
        - deployment_id
        - prompt_tokens
        - completion_tokens
        - total_tokens
      title: OrgUsageRow
      description: Tokens one user spent on one model (deployment), prompt + completion.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass an API key (prefixed `lk_`) or a JWT access token as a bearer
        token. Generate API keys in the dashboard at
        https://dashboard.lyceum.technology/api-keys.

````