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

# List Usage Records

> List billed credit usage records for your account, scoped to accessible workspaces

export const limit_0 = 600

<Info>
  **Rate Limit:** This endpoint is limited to **{limit_0.toLocaleString()} requests per minute** per user.
</Info>


## OpenAPI

````yaml openapi.json GET /api/v1/client/usage
openapi: 3.1.0
info:
  title: kolena
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/client/usage:
    get:
      tags:
        - client
        - usage
      summary: Client List Usage Records
      operationId: client_list_usage_records_api_v1_client_usage_get
      parameters:
        - name: page_number
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Optionally specify the index of the Usage Records page to fetch.
            default: 0
            title: Page Number
          description: Optionally specify the index of the Usage Records page to fetch.
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 0
            description: Optionally specify the maximum number of Usage Records to fetch.
            default: 50
            title: Page Size
          description: Optionally specify the maximum number of Usage Records to fetch.
        - name: created_gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Optionally filter Usage Records created on or after this timestamp
              (inclusive). Accepts ISO 8601 format (e.g., `2024-01-15T10:30:00Z`
              or `2024-01-15T10:30:00+00:00`).
            title: Created Gte
          description: >-
            Optionally filter Usage Records created on or after this timestamp
            (inclusive). Accepts ISO 8601 format (e.g., `2024-01-15T10:30:00Z`
            or `2024-01-15T10:30:00+00:00`).
        - name: created_lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Optionally filter Usage Records created on or before this
              timestamp (inclusive). Accepts ISO 8601 format (e.g.,
              `2024-01-15T23:59:59Z` or `2024-01-15T23:59:59+00:00`).
            title: Created Lte
          description: >-
            Optionally filter Usage Records created on or before this timestamp
            (inclusive). Accepts ISO 8601 format (e.g., `2024-01-15T23:59:59Z`
            or `2024-01-15T23:59:59+00:00`).
        - name: agent_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: >-
              Optionally filter Usage Records to those associated with this
              Agent.
            title: Agent Id
          description: Optionally filter Usage Records to those associated with this Agent.
        - name: workspace_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Optionally filter Usage Records to those within this Workspace.
            title: Workspace Id
          description: Optionally filter Usage Records to those within this Workspace.
        - name: user
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optionally filter Usage Records to those attributed to this user.
            title: User
          description: Optionally filter Usage Records to those attributed to this user.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListUsageRecordsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ListUsageRecordsResponse:
      properties:
        records:
          items:
            $ref: '#/components/schemas/ClientUsageRecord'
          type: array
          title: Records
          description: The fetched page of Usage Records.
        total_pages:
          type: integer
          title: Total Pages
          description: >-
            The total number of pages of Usage Records. Use the request
            arguments `page_number` and `page_size` to control which Usage
            Records are fetched.
        page_number:
          type: integer
          title: Page Number
          description: The number of the fetched page.
        page_size:
          type: integer
          title: Page Size
          description: The page size, i.e. number of Usage Records, fetched.
      type: object
      required:
        - records
        - total_pages
        - page_number
        - page_size
      title: ListUsageRecordsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ClientUsageRecord:
      properties:
        type:
          type: string
          title: Type
          description: >-
            The kind of Usage Record. `agent_run` for Agent Run charges,
            `validation` for Validation charges. New values may be added in the
            future.
        workspace_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workspace Id
          description: The Workspace associated with this Usage Record, if any.
        agent_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Agent Id
          description: The Agent associated with this Usage Record, if any.
        run_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Run Id
          description: The Agent Run associated with this Usage Record, if any.
        user:
          type: string
          title: User
          description: The user whose activity produced this Usage Record.
        created:
          type: string
          format: date-time
          title: Created
          description: ISO 8601 timestamp indicating when this Usage Record was created.
        credits_used:
          type: number
          title: Credits Used
          description: The number of credits used by this Usage Record.
        validation_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Validation Id
          description: The Validation associated with this Usage Record, if any.
      type: object
      required:
        - type
        - workspace_id
        - agent_id
        - run_id
        - user
        - created
        - credits_used
        - validation_id
      title: ClientUsageRecord
    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:
    HTTPBearer:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`. The `<token>`
        represents your API key, which must be acquired from the Kolena
        platform.

````