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

# Get credit balance

> Check a workspace's remaining credits and what each credit-priced action costs it.



## OpenAPI

````yaml https://www.rainbrand.com/api/v1/spec.json get /credits
openapi: 3.1.1
info:
  title: Rainbrand API
  version: 1.0.0
servers:
  - url: https://www.rainbrand.com/api/v1
security:
  - apiKey: []
  - bearer: []
tags:
  - name: Uploads
    description: >-
      Stage private local files for brand sources, the Library, and other
      supported operations.
  - name: Account
    description: >-
      Inspect the authenticated account — profile, credit balance, and
      accessible workspaces.
  - name: Brands
    description: Manage brands and brand identity.
  - name: Library
    description: Add, list, and remove a brand's images, video, and audio.
  - name: Images
    description: Retrieve and manage images.
  - name: Videos
    description: Retrieve and manage video files.
  - name: Audio
    description: Retrieve and manage audio files.
  - name: Briefs
    description: Get brand guidance and selected assets for a specific task.
  - name: Models
    description: Find available models and check their inputs.
  - name: Generations
    description: Create and retrieve model generations.
  - name: Reviews
    description: >-
      Check an asset against a brand's color, typography, logo, and copy
      guidance.
paths:
  /credits:
    get:
      tags:
        - Account
      summary: Get credit balance
      description: >-
        Check a workspace's remaining credits and what each credit-priced action
        costs it.
      operationId: credits.get
      parameters:
        - name: workspaceId
          in: query
          schema:
            type: string
            minLength: 1
            description: Team workspace ID. Omit to check the personal workspace balance.
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      balance:
                        type: number
                      unlimited:
                        type: boolean
                      pricing_version:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: >-
                          The workspace's pricing version. Credit amounts are
                          comparable only within one version.
                      credit_costs:
                        type: object
                        properties:
                          brand_creation:
                            type: number
                          brand_edit:
                            type: number
                          brief:
                            type: number
                          review:
                            type: number
                          image_2k:
                            type: number
                            description: >-
                              Per managed 2K image. Resize and background
                              removal use the source image's size; vectorize
                              always costs this.
                          image_4k:
                            type: number
                            description: Per managed 4K image
                        required:
                          - brand_creation
                          - brand_edit
                          - brief
                          - review
                          - image_2k
                          - image_4k
                        description: >-
                          Credits each action costs this workspace. 0 means the
                          action is free right now. Selected-model generations
                          are priced per request and aren't listed.
                      free_brand_creations:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: >-
                          Brand creations the workspace can still make without
                          spending credits
                    required:
                      - balance
                      - unlimited
                      - pricing_version
                      - credit_costs
                      - free_brand_creations
                required:
                  - data
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsGet401ErrorResponse'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsGet403ErrorResponse'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsGet404ErrorResponse'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsGet429ErrorResponse'
          headers:
            Retry-After:
              description: >-
                Seconds until the applicable request or operation limit resets.
                Present when the limiter can calculate the delay.
              schema:
                type: integer
                minimum: 0
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsGet500ErrorResponse'
components:
  schemas:
    CreditsGet401ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: UNAUTHORIZED
                    status:
                      const: 401
                    message:
                      type: string
                      default: Invalid or missing API credentials
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    CreditsGet403ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: ACCOUNT_BANNED
                    status:
                      const: 403
                    message:
                      type: string
                      default: This account has been suspended.
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: FORBIDDEN
                    status:
                      const: 403
                    message:
                      type: string
                      default: Plan upgrade required
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    CreditsGet404ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: WORKSPACE_NOT_FOUND
                    status:
                      const: 404
                    message:
                      type: string
                      default: Workspace not found or not accessible
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    CreditsGet429ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: TOO_MANY_REQUESTS
                    status:
                      const: 429
                    message:
                      type: string
                      default: Rate limit exceeded
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    CreditsGet500ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: INTERNAL_SERVER_ERROR
                    status:
                      const: 500
                    message:
                      type: string
                      default: Failed to check credit balance
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    ApiError:
      type: object
      properties:
        code:
          type: string
        status:
          type: integer
        message:
          type: string
        data: {}
      required:
        - code
        - status
        - message
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Rainbrand API key, for example `x-api-key: bloom_sk_...`.'
    bearer:
      type: http
      scheme: bearer
      description: >-
        Rainbrand API key (`Bearer bloom_sk_...`) or Rainbrand OAuth access
        token.

````

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