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

# Get credit balances and current usage

> A live snapshot: workspace balances, credits used today per agent (all agents, including disabled and private ones), and credits used this month per team. Accepts no date filters and keeps no history — snapshot the response yourself if you need a time series.



## OpenAPI

````yaml /api-reference/workspace-api.json get /workspaceapi/credits
openapi: 3.1.0
info:
  title: Abundly Workspace API
  description: >-
    Read-only access to workspace-level and per-agent data. Every endpoint is a
    GET authenticated with a workspace API key (wk_) that has the Workspace read
    API scope.


    Private agents are listed by /workspaceapi/agents but return 403 on every
    per-agent endpoint, so enumerate from
    /workspaceapi/agents?includeOverview=true rather than iterating agent ids.
  version: 1.0.0
servers:
  - url: https://service.abundly.ai
    description: Shared platform
  - url: https://{tenant}.service.abundly.ai
    description: Dedicated deployment
    variables:
      tenant:
        default: your-tenant
security:
  - workspaceApiKey: []
paths:
  /workspaceapi/credits:
    get:
      summary: Get credit balances and current usage
      description: >-
        A live snapshot: workspace balances, credits used today per agent (all
        agents, including disabled and private ones), and credits used this
        month per team. Accepts no date filters and keeps no history — snapshot
        the response yourself if you need a time series.
      operationId: credits
      responses:
        '200':
          description: Success. Empty result sets are also 200.
          content:
            application/json:
              schema:
                description: Live snapshot — today per agent, current month per team.
                type: object
                properties:
                  totalBalance:
                    type: number
                  totalBalanceNoNegative:
                    description: totalBalance floored at zero.
                    type: number
                  topupBalance:
                    type: number
                  subscriptionBalance:
                    type: number
                  lastUpdated:
                    type: string
                  defaultDailyCreditLimitPerAgent:
                    type: number
                  agentUsage:
                    description: >-
                      Keyed by agent id. Covers every agent, including disabled
                      and private ones.
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: object
                      properties:
                        name:
                          type: string
                        creditsUsedToday:
                          type: number
                        dailyCreditLimit:
                          description: The agent's own limit, or the workspace default.
                          type: number
                        isDailyCreditLimitExceeded:
                          type: boolean
                      required:
                        - name
                        - creditsUsedToday
                        - isDailyCreditLimitExceeded
                      additionalProperties: {}
                  groupUsage:
                    description: Keyed by team id.
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: object
                      properties:
                        name:
                          type: string
                        creditsUsedThisMonth:
                          type: number
                        monthlyCreditLimit:
                          type: number
                        isMonthlyLimitExceeded:
                          type: boolean
                      required:
                        - name
                        - creditsUsedThisMonth
                        - isMonthlyLimitExceeded
                      additionalProperties: {}
                required:
                  - totalBalance
                  - totalBalanceNoNegative
                  - topupBalance
                  - subscriptionBalance
                  - agentUsage
                  - groupUsage
                additionalProperties: {}
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: >-
        Error. Every failure on this API returns JSON with a single `error`
        field.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                description: >-
                  Human-readable message. Every error on this API uses this
                  shape.
                type: string
            required:
              - error
            additionalProperties: false
  securitySchemes:
    workspaceApiKey:
      type: http
      scheme: bearer
      description: Workspace API key (wk_) with the Workspace read API scope enabled.

````