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

# Get credits and auto top-up

> Owner or admin only. Returns the full credit wallet as the Billing tab shows it: plan and top-up credits, the rollover cap, and the auto top-up settings and this month's auto top-up spend.




## OpenAPI

````yaml /openapi/billing.yaml get /workspaces/{workspaceId}/billing/usage
openapi: 3.1.0
info:
  title: Connie Billing API
  version: 1.0.0
  description: >
    Endpoints the Connie web app uses for billing. They authenticate with your
    signed-in browser session — see
    https://docs.connie.ai/api-reference/authentication. These are the app's own
    endpoints and can change when the app changes.
servers:
  - url: https://connie.ai/api
security:
  - sessionCookie: []
tags:
  - name: Credits
    description: >
      The workspace's credit balance. Any member can read the balance and plan
      prices; plan details and everything else in Billing are for workspace
      owners and admins only.
  - name: Plan
    description: The workspace's plan and subscription. Owners and admins only.
  - name: Usage log
    description: >-
      Every credit used or added, as shown in Settings > Logs. Owners and admins
      only.
paths:
  /workspaces/{workspaceId}/billing/usage:
    get:
      tags:
        - Plan
      summary: Get credits and auto top-up
      description: >
        Owner or admin only. Returns the full credit wallet as the Billing tab
        shows it: plan and top-up credits, the rollover cap, and the auto top-up
        settings and this month's auto top-up spend.
      operationId: getBillingUsage
      parameters:
        - $ref: '#/components/parameters/workspaceId'
      responses:
        '200':
          description: Wallet and plan usage.
          content:
            application/json:
              schema:
                type: object
                properties:
                  tier:
                    $ref: '#/components/schemas/PlanTier'
                  billingInterval:
                    type: string
                    enum:
                      - month
                      - year
                  lastCreditGrantAt:
                    type:
                      - integer
                      - 'null'
                    description: When plan credits were last granted (Unix seconds).
                  seats:
                    type: integer
                    description: >-
                      Number of workspace members. Plans are not priced per
                      seat.
                  credits:
                    oneOf:
                      - $ref: '#/components/schemas/Wallet'
                      - type: 'null'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/AdminOnly'
components:
  parameters:
    workspaceId:
      name: workspaceId
      in: path
      required: true
      description: The workspace id, as in the app URL `connie.ai/<workspaceId>/...`.
      schema:
        type: string
        format: uuid
  schemas:
    PlanTier:
      type: string
      description: >
        The plan, as a stable id. In the app, `starter`, `plus` and `build` are
        the Starter plans (2,500, 10,000 and 22,000 credits a month) and
        `scale`, `growth` and `pro_max` are the Scale plans (35,000, 55,000 and
        100,000).
      enum:
        - free
        - starter
        - plus
        - build
        - scale
        - growth
        - pro_max
    Wallet:
      type: object
      properties:
        balance:
          type: number
          description: Total credits (plan plus top-up).
        seatBalance:
          type: number
          description: Plan credits.
        topupBalance:
          type: number
          description: Top-up credits.
        seatCreditCap:
          type: number
          description: >-
            The most plan credits a grant can top you up to. Credits above it
            are forfeited.
        autoTopupEnabled:
          type: boolean
        autoTopupThreshold:
          type: number
          description: Auto top-up runs when the balance falls below this many credits.
        autoTopupAmountCents:
          type:
            - integer
            - 'null'
          description: How much each auto top-up charges.
        autoTopupMonthlyLimitCents:
          type:
            - integer
            - 'null'
          description: Optional cap on auto top-up charges per calendar month.
        autoTopupSpentThisMonthCents:
          type: integer
        autoTopupCardDeclined:
          type: boolean
          description: Auto top-up is waiting for a new card after a decline.
    Error:
      type: object
      properties:
        error:
          type: string
          description: A readable message.
        code:
          type: string
          description: A machine-readable code, when the route sets one.
  responses:
    Unauthorized:
      description: No valid session, or the session has expired (`SESSION_EXPIRED`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AdminOnly:
      description: >-
        You are not a member of this workspace, or you are not an owner or
        admin.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: header
      name: Cookie
      description: >-
        The full Cookie header copied from a signed-in connie.ai browser
        request. See the Authentication page.

````

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