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

# Get Usage

> GPU-hours per server and rated charges for a UTC month



## OpenAPI

````yaml /api/openapi.json get /usage
openapi: 3.1.0
info:
  description: Programmatic access to Infinite Compute GPU servers, volumes and usage.
  title: Infinite Compute API
  version: v1
servers:
  - url: https://{console}/api/public/v1
    description: Your console address is in your welcome email
    variables:
      console:
        default: your-console-address
security: []
paths:
  /usage:
    get:
      tags:
        - Usage
      summary: Get Usage
      description: GPU-hours per server and rated charges for a UTC month
      operationId: get_usage_usage_get
      parameters:
        - description: YYYY-MM (UTC); default this month
          in: query
          name: month
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: YYYY-MM (UTC); default this month
            title: Month
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Usage'
          description: Successful Response
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Error
      security:
        - ApiKey: []
components:
  schemas:
    Usage:
      properties:
        end:
          format: date-time
          title: End
          type: string
        generated_at:
          format: date-time
          title: Generated At
          type: string
        month:
          description: YYYY-MM (UTC)
          title: Month
          type: string
        servers:
          items:
            $ref: '#/components/schemas/UsageServer'
          title: Servers
          type: array
        spend:
          anyOf:
            - $ref: '#/components/schemas/UsageSpend'
            - type: 'null'
          description: Rated charges; null when the project has no billing account
        start:
          format: date-time
          title: Start
          type: string
        total_gpu_hours:
          title: Total Gpu Hours
          type: number
      required:
        - month
        - start
        - end
        - generated_at
        - total_gpu_hours
        - servers
      title: Usage
      type: object
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      title: ErrorResponse
      type: object
    UsageServer:
      properties:
        deleted:
          title: Deleted
          type: boolean
        gpu_count:
          title: Gpu Count
          type: integer
        gpu_hours:
          title: Gpu Hours
          type: number
        gpu_model:
          description: Display name of the GPU
          title: Gpu Model
          type: string
        name:
          title: Name
          type: string
        server_id:
          title: Server Id
          type: string
        server_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Server Type
        sku:
          anyOf:
            - type: string
            - type: 'null'
          description: Billing SKU, e.g. gpu:h100
          title: Sku
      required:
        - server_id
        - name
        - gpu_model
        - gpu_count
        - gpu_hours
        - deleted
      title: UsageServer
      type: object
    UsageSpend:
      properties:
        amount:
          description: 'Decimal string: this project''s rated charges'
          title: Amount
          type: string
        currency:
          title: Currency
          type: string
        lines:
          items:
            $ref: '#/components/schemas/UsageSpendLine'
          title: Lines
          type: array
        rated_until:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Usage after this isn't rated yet
          title: Rated Until
      required:
        - currency
        - amount
        - lines
      title: UsageSpend
      type: object
    ErrorDetail:
      properties:
        code:
          description: Machine-readable error code, e.g. not_found
          title: Code
          type: string
        message:
          description: What went wrong, for people
          title: Message
          type: string
        request_id:
          description: Quote this when contacting support
          title: Request Id
          type: string
      required:
        - code
        - message
        - request_id
      title: ErrorDetail
      type: object
    UsageSpendLine:
      properties:
        amount:
          description: Decimal string, in currency
          title: Amount
          type: string
        quantity:
          description: Decimal string
          title: Quantity
          type: string
        sku:
          title: Sku
          type: string
        unit:
          description: e.g. gpu_hour
          title: Unit
          type: string
      required:
        - sku
        - unit
        - quantity
        - amount
      title: UsageSpendLine
      type: object
  securitySchemes:
    ApiKey:
      description: 'An API key from the console: Authorization: Bearer ic_ck_...'
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.