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

# Get aicreditsusage

> Get the AI credit usage for the current month and the number of allowed credits.



## OpenAPI

````yaml /schema.json get /ai/credits/usage
openapi: 3.1.0
info:
  version: 01M3PH99FZXD3ZNWYA5Q3XG6JJ
  title: Alumio API
  description: Access Alumio through OpenAPI v3.1.
servers:
  - url: /api/v1
security: []
paths:
  /ai/credits/usage:
    get:
      tags:
        - AI
      description: >-
        Get the AI credit usage for the current month and the number of allowed
        credits.
      operationId: getAiCreditUsage
      parameters:
        - name: space
          in: query
          description: Space Identifier
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The AI credit usage for the current month.
          content:
            application/json:
              schema:
                type: object
                properties:
                  creditsUsed:
                    type: number
                    format: float
                    title: >-
                      The number of AI credits used in the current month,
                      rounded to 2 decimals. Each token type (input, output,
                      cache write, cache read) is weighted by its model price.
                  creditsAllowed:
                    type: integer
                    title: >-
                      The number of AI credits allowed per month for this
                      environment.
                required:
                  - creditsUsed
                  - creditsAllowed
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        status:
          type: string
        context:
          type: object
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        violations:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              propertyPath:
                type: string
              type:
                type: string

````