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

# Get balance

> Get remaining USD balance.



## OpenAPI

````yaml GET /v1/balance
openapi: 3.1.0
info:
  title: Mindcase API
  version: '1.0'
  description: Structured web data APIs for AI agents.
servers:
  - url: https://api.mindcase.co
security:
  - bearerAuth: []
paths:
  /v1/balance:
    get:
      tags:
        - Developer API
      summary: Get Balance
      description: Get remaining USD balance.
      operationId: get_balance_v1_balance_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        default:
          description: Any error. See `error.code`.
          headers:
            X-Request-ID:
              description: >-
                The id of this call, also in `error.request_id`. Quote it when
                contacting support.
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying, on retryable errors.
              schema:
                type: integer
            RateLimit-Limit:
              description: Requests allowed per minute in this bucket.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until a slot frees.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKey: []
components:
  schemas:
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
        detail:
          title: Detail
          description: Legacy field, kept for existing clients. Prefer `error`.
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Errors
          description: >-
            Legacy per-field list on parameter errors. Same as
            `error.details.errors`.
      type: object
      required:
        - error
        - detail
      title: ErrorResponse
      description: >-
        The body of every non-2xx response.


        | Situation | How you see it | `retryable` | Wait |

        |---|---|---|---|

        | Rate limited | HTTP 429 | yes | `retry_after_seconds` |

        | We couldn't read your balance | HTTP 503, or a `failed` job with
        `balance_unavailable` | yes | 5s |

        | Something failed on our side | HTTP 5xx, or a `failed` job | yes | 30s
        |

        | Bad parameters | HTTP 422 | no | Fix them first |

        | Not enough balance | HTTP 402, or `rejected_balance` | no | Add
        balance first |

        | Bad API key | HTTP 401 | no | Fix the key first |

        | Run ended short with rows | `completed` with a `stop_reason` | no |
        Run again on purpose for the rest |


        Retry only when `retryable` is true, after `retry_after_seconds`.
        Without a

        wait, back off exponentially with jitter, up to 30s and about 5
        attempts.

        Send an `Idempotency-Key` so a retry can't charge twice.
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
          description: Stable machine-readable code. Branch on this.
        message:
          type: string
          title: Message
          description: Plain English. May be reworded.
        request_id:
          type: string
          title: Request Id
          description: Quote this when contacting support.
        retryable:
          type: boolean
          title: Retryable
          description: Whether the same request, unchanged, can succeed later.
        retry_after_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry After Seconds
          description: >-
            When `retryable` is true, how long to wait. Matches the
            `Retry-After` header.
        fault:
          type: string
          enum:
            - input
            - mindcase
          title: Fault
          description: >-
            Whose problem this is: `input` (the request; fix it first) or
            `mindcase` (ours).
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: Extra fields, per code.
      type: object
      required:
        - code
        - message
        - request_id
        - retryable
        - fault
      title: ErrorBody
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your Mindcase API key, mk_live_...
    ApiKey:
      type: http
      description: 'Your Mindcase API key: `Authorization: Bearer mk_live_...`'
      scheme: bearer

````

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