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

# Get credit balance

> Returns the same credit-balance account state surfaced by the CLI `peel credits` command.



## OpenAPI

````yaml /openapi.json get /account/credits
openapi: 3.1.0
info:
  title: Peel API
  version: '2026-03-21'
  description: >-
    Public Peel API for creating APIs from URLs, inspecting them, calling
    generated endpoints, revising builds, and exporting OpenAPI or MCP
    definitions.
servers:
  - url: https://api.peel.sh
security: []
tags:
  - name: APIs
    description: Create, list, inspect, revise, rebuild, and export APIs.
  - name: Account
    description: Credits and account usage surfaces used by CLI, REST, and MCP clients.
  - name: Device Auth
    description: CLI browser-login device flow helpers.
  - name: Endpoint Execution
    description: Execute generated endpoints through a stable API resource.
  - name: OAuth
    description: OAuth discovery and token flows for hosted MCP clients.
  - name: MCP
    description: Hosted MCP transport and discovery surface.
paths:
  /account/credits:
    get:
      tags:
        - Account
      summary: Get credit balance
      description: >-
        Returns the same credit-balance account state surfaced by the CLI `peel
        credits` command.
      operationId: getCredits
      responses:
        '200':
          description: Current credit state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCreditState'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PublicCreditState:
      type: object
      required:
        - auto_recharge_enabled
        - auto_recharge_monthly_limit
        - auto_recharge_pack
        - auto_recharge_threshold
        - credits
        - current_period_end
        - has_subscription
        - is_unlimited
        - monthly_credits
        - plan
        - purchased_credits
        - subscription_credits
        - updated_at
        - used_credits
        - used_purchased_credits
        - used_subscription_credits
      properties:
        auto_recharge_enabled:
          type: boolean
        auto_recharge_monthly_limit:
          type: integer
          minimum: 0
        auto_recharge_pack:
          type: string
        auto_recharge_threshold:
          type: integer
          minimum: 0
        credits:
          type: integer
          minimum: 0
        current_period_end:
          oneOf:
            - type: string
            - type: 'null'
        has_subscription:
          type: boolean
        is_unlimited:
          type: boolean
        monthly_credits:
          oneOf:
            - type: integer
              minimum: 0
            - type: 'null'
        plan:
          type: string
        purchased_credits:
          type: integer
          minimum: 0
        subscription_credits:
          type: integer
          minimum: 0
        updated_at:
          type: string
        used_credits:
          type: integer
          minimum: 0
        used_purchased_credits:
          type: integer
          minimum: 0
        used_subscription_credits:
          type: integer
          minimum: 0
      additionalProperties: false
  responses:
    Unauthorized:
      description: Missing or invalid auth.
      headers:
        WWW-Authenticate:
          schema:
            type: string
          description: OAuth bearer challenge with MCP resource metadata when available.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
            additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````