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

# Get credit balance and API usage



## OpenAPI

````yaml /api-reference/openapi.json get /v1/usage
openapi: 3.1.0
info:
  title: Mint Public API
  version: 0.1.0-alpha
  description: REST API for Mint World and 3D Model generation workflows.
  license:
    name: Proprietary
    url: https://docs.mint.gg/terms-of-service
servers:
  - url: https://api.mint.gg
    description: Production
  - url: https://api.dev.mint.gg
    description: Development
  - url: http://api.mint.localhost
    description: Local development
security: []
tags:
  - name: Account
    description: Developer account and health endpoints.
  - name: Generation
    description: Long-running World, 3D Model, and model optimization operations.
  - name: Conversion
    description: Long-running 3D Model format conversion operations.
  - name: Assets
    description: Generated World, 3D Model, and asset reads.
paths:
  /v1/usage:
    get:
      tags:
        - Account
      summary: Get credit balance and API usage
      operationId: getUsage
      responses:
        '200':
          description: Credit balance and API usage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Usage'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - bearerApiKey: []
components:
  schemas:
    Usage:
      type: object
      required:
        - object
        - credits
        - subscription
        - apiUsage
      properties:
        object:
          const: usage
        credits:
          $ref: '#/components/schemas/CreditSummary'
        subscription:
          oneOf:
            - type: object
              required:
                - tier
                - status
                - currentPeriodEnd
              properties:
                tier:
                  type:
                    - string
                    - 'null'
                status:
                  type:
                    - string
                    - 'null'
                currentPeriodEnd:
                  type:
                    - string
                    - 'null'
                  format: date-time
            - type: 'null'
        apiUsage:
          $ref: '#/components/schemas/ApiUsage'
    CreditSummary:
      type: object
      required:
        - totalAvailable
        - monthlyRemaining
        - monthlyAllowance
        - monthlyUsed
        - topUpBalance
      properties:
        totalAvailable:
          type: number
        monthlyRemaining:
          type: number
        monthlyAllowance:
          type: number
        monthlyUsed:
          type: number
        topUpBalance:
          type: number
    ApiUsage:
      type: object
      required:
        - requestCount
        - succeededCount
        - failedCount
        - previewReadyCount
        - creditsUsed
      properties:
        requestCount:
          type: number
        succeededCount:
          type: number
        failedCount:
          type: number
        previewReadyCount:
          type: number
        creditsUsed:
          type: number
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri-reference
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
          format: uri-reference
  responses:
    BadRequest:
      description: Request validation failed.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: Missing, malformed, inactive, or revoked API key.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    TooManyRequests:
      description: Request was rate limited.
      headers:
        Retry-After:
          schema:
            type: string
          description: Seconds to wait before retrying.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer
      description: Mint API key sent as a Bearer token.

````