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

# Get credit info

> Returns the authenticated team credit balance, per-lot breakdown, active subscription, and whether usage is allowed.

For a guided overview, see [Balance & billing](/balance-billing/balance-and-billing).


## OpenAPI

````yaml openapi/billing.json GET /user/credits/info
openapi: 3.0.3
info:
  title: Balance & Billing API
  version: 1.0.0
  description: Read credit balance and purchase top-ups for the authenticated team.
servers:
  - url: https://api.olostep.com
security: []
tags:
  - name: Balance & Billing
    description: Credit balance and top-up purchase endpoints.
paths:
  /user/credits/info:
    get:
      tags:
        - Balance & Billing
      summary: Get credit info
      description: >-
        Returns the authenticated team's credit balance, per-lot breakdown,
        active subscription, and whether usage is allowed. Useful for billing
        widgets, usage dashboards, and pre-flight checks before large jobs.
      responses:
        '200':
          description: Credit balance and billing context for the authenticated team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsInfoResponse'
              example:
                credits: 12500
                breakdown:
                  - purchase_kind: Subscription
                    allocated_units: 10000
                    remaining_units: 8500
                    expiry_date: 1735689600
                  - purchase_kind: Top-up
                    allocated_units: 5000
                    remaining_units: 4000
                    expiry_date: 1743465600
                active_subscription:
                  id: SUB_PRO
                  display_name: Pro
                  credits: 10000
                  created_at: 1704067200
                allow_usage: true
        '402':
          description: Invalid API key.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Internal Server Error
      security:
        - Authorization: []
components:
  schemas:
    CreditsInfoResponse:
      type: object
      properties:
        credits:
          type: integer
          description: Total remaining credits across all non-expired lots.
        breakdown:
          type: array
          items:
            $ref: '#/components/schemas/CreditsBreakdownItem'
          description: Per-lot credit detail.
        active_subscription:
          $ref: '#/components/schemas/ActiveSubscription'
        allow_usage:
          type: boolean
          description: Whether the team can still consume credits.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Machine-readable error code.
        retry_after:
          type: integer
          description: >-
            Seconds until another purchase attempt is allowed (cooldown
            responses only).
        cooldown_seconds:
          type: integer
          description: Cooldown window in seconds (cooldown responses only).
    CreditsBreakdownItem:
      type: object
      properties:
        purchase_kind:
          type: string
          enum:
            - Subscription
            - Top-up
            - Manual
            - Setup
            - Pending
          description: How the credit lot was issued.
        allocated_units:
          type: integer
          description: Credits originally allocated to this lot.
        remaining_units:
          type: integer
          description: Credits still available in this lot.
        expiry_date:
          type: integer
          description: Unix timestamp when this lot expires.
    ActiveSubscription:
      type: object
      properties:
        id:
          type: string
          description: >-
            Subscription product id (for example `SUB_PRO`). Falls back to
            `SUB_BASE` when no active subscription exists.
        display_name:
          type: string
          description: Human-readable plan name.
        credits:
          type: integer
          description: Credits included in the active plan.
        created_at:
          type: integer
          description: Unix timestamp when the subscription was created.
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````