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

# Get credit balance

> The balance, its grants, and what holds the reserved part (`reservations`).
`financial_blocked` says the figures are paused for reconciliation, when they and the
reservations can disagree until the account is repaired.



## OpenAPI

````yaml /openapi.json get /v1/account/wallet
openapi: 3.1.0
info:
  title: OneHot workbench
  description: >-
    Native decisions, versioned datasets, adaptation and shared-base deployment.
    Authenticate with `Authorization: Bearer onehot_sk_...` when accounts are
    on. A short guide for coding agents is at /llms.txt. Hosted account APIs
    accept a Bearer API key or a browser session. A full or read-only API key
    reads its account, and no key can change it: keys, billing and settings
    change in the console. Browser mutations require the configured Origin and
    X-CSRF-Token from /auth/session. Account recovery and history remain
    available to blocked accounts. Waitlisted accounts can read their account
    summary and model catalogue and request early access; private member APIs
    require admission. Money fields ending in _usd are exact decimal strings;
    never interpret them as integer cents. Authenticated customer reads and
    existing-operation replays share read_rpm, and other customer writes except
    decisions and their estimates share write_rpm. Exhausted budgets return 429
    with Retry-After; unavailable admission storage returns 503.
  version: 0.1.0
servers:
  - url: https://api.sqwish.ai
security: []
tags:
  - name: Decisions
    description: Probabilities for questions with fixed outcomes.
  - name: Models
    description: Base models, and fine-tuned models by their numbers.
  - name: Families
    description: >-
      Lines of models trained on one dataset, and the switches that let them
      answer calls.
  - name: Datasets
    description: >-
      Validated training examples. A dataset grows in versions, and a version
      never changes.
  - name: Evaluations
    description: Reusable model results on a dataset's fixed evaluation rows.
  - name: Fine-tuning
    description: Training jobs, their events and held-out results.
  - name: Prompt tuning
    description: Better wording for a decision, tested on your rows. Words, not weights.
  - name: Labeling
    description: Teacher labels for real queries, reviewed by you.
  - name: Accounts
    description: Email OTP sign-in, revocable sessions, security and API keys.
  - name: Billing
    description: Exact USD balances, purchases, automatic top-ups and referrals.
  - name: Integrations
    description: Endpoints other tools call, such as Claude Code.
  - name: System
    description: Health and discovery.
paths:
  /v1/account/wallet:
    get:
      tags:
        - Billing
      summary: Get credit balance
      description: >-
        The balance, its grants, and what holds the reserved part
        (`reservations`).

        `financial_blocked` says the figures are paused for reconciliation, when
        they and the

        reservations can disagree until the account is repaired.
      operationId: getWallet
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  currency:
                    type: string
                    const: USD
                    title: Currency
                  paid_usd:
                    type: string
                    title: Paid Usd
                  promotional_usd:
                    type: string
                    title: Promotional Usd
                  balance_usd:
                    type: string
                    title: Balance Usd
                    description: >-
                      The credit the account has: paid credit and promotional
                      grants, with what expired grants still hold for work in
                      progress. Available plus reserved, unless a reversed
                      payment left paid holds uncovered.
                  available_usd:
                    type: string
                    title: Available Usd
                  reserved_usd:
                    type: string
                    title: Reserved Usd
                  financial_shortfall_usd:
                    type: string
                    title: Financial Shortfall Usd
                    description: >-
                      Paid credit the account is missing: what it owes, and paid
                      holds it no longer covers.
                  grants:
                    items:
                      $ref: '#/components/schemas/Grant'
                    title: Grants
                    type: array
                  reservations:
                    $ref: '#/components/schemas/Reservations'
                    description: >-
                      What holds the reserved credit. Each reservation is
                      charged or released when its work ends.
                  financial_blocked:
                    description: >-
                      True while the account's figures are paused for
                      reconciliation: work it accepted still ends and is
                      recorded, but the balance, available and reserved amounts
                      stay as they were until support repairs them, so they can
                      disagree with `reservations` meanwhile.
                    title: Financial Blocked
                    type: boolean
                required:
                  - currency
                  - paid_usd
                  - promotional_usd
                  - balance_usd
                  - available_usd
                  - reserved_usd
                  - financial_shortfall_usd
                  - grants
                  - reservations
                  - financial_blocked
                title: AccountWallet
                type: object
        4XX:
          description: >-
            Client error. On a 422, `error.details` lists each field that
            failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        5XX:
          description: Server error. A 503 names what is not running on this server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    Grant:
      properties:
        id:
          type: string
          title: Id
        source:
          type: string
          title: Source
        amount_usd:
          type: string
          title: Amount Usd
        spent_usd:
          type: string
          title: Spent Usd
        held_usd:
          type: string
          title: Held Usd
        created_at:
          type: number
          title: Created At
        expires_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Expires At
        revoked_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Revoked At
      type: object
      required:
        - id
        - source
        - amount_usd
        - spent_usd
        - held_usd
        - created_at
        - expires_at
        - revoked_at
      title: Grant
      description: >-
        A promotional grant as its owner sees it. How it was issued stays on the
        server: a

        referral's names the person who bought, and an administrator's names the
        administrator.
    Reservations:
      properties:
        work:
          items:
            $ref: '#/components/schemas/HeldWork'
          type: array
          title: Work
        decisions:
          $ref: '#/components/schemas/HeldDecisions'
          description: Inference requests in flight.
      type: object
      required:
        - work
        - decisions
      title: Reservations
    ErrorResponse:
      description: >-
        The body of every error. app.failure() builds it; this model documents
        it.
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
      title: ErrorResponse
      type: object
    HeldWork:
      properties:
        activity:
          type: string
          enum:
            - labeling
            - fine_tuning
            - prompts
            - keep_warm
            - dataset_storage
          title: Activity
        id:
          type: string
          title: Id
          description: The job, the kept-warm model or the dataset.
        name:
          type: string
          title: Name
        reserved_usd:
          type: string
          title: Reserved Usd
        since:
          type: number
          title: Since
        until:
          anyOf:
            - type: number
            - type: 'null'
          title: Until
          description: >-
            When a keep-warm hour or a day of storage ends; null for a job,
            which holds until it ends.
        reason:
          anyOf:
            - type: string
              const: rerun
            - type: 'null'
          title: Reason
          description: >-
            A prompt-tuning job that retests rows tested before: charged when
            its test runs, whatever the verdict.
      type: object
      required:
        - activity
        - id
        - name
        - reserved_usd
        - since
        - until
      title: HeldWork
    HeldDecisions:
      properties:
        requests:
          type: integer
          title: Requests
        reserved_usd:
          type: string
          title: Reserved Usd
      type: object
      required:
        - requests
        - reserved_usd
      title: HeldDecisions
    ErrorBody:
      properties:
        code:
          description: A stable code to branch on, such as invalid_request.
          title: Code
          type: string
        message:
          description: What went wrong and what to change, in plain words.
          title: Message
          type: string
        retryable:
          description: >-
            True when another attempt may succeed; it does not prove that no
            work was done. Respect Retry-After when present. Only operations
            that support Idempotency-Key replay a prior result, including
            /v1/decide for 24 hours.
          title: Retryable
          type: boolean
        request_id:
          description: Also sent as X-Request-ID. Quote it in bug reports.
          title: Request Id
          type: string
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorDetail'
              type: array
            - type: 'null'
          default: null
          description: On validation errors, one entry for each field that failed.
          title: Details
      required:
        - code
        - message
        - retryable
        - request_id
      title: ErrorBody
      type: object
    ErrorDetail:
      properties:
        path:
          description: Where the problem is, such as ["body", "decisions", 0, "outcomes"].
          items:
            anyOf:
              - type: string
              - type: integer
          title: Path
          type: array
        message:
          title: Message
          type: string
        type:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Type
      required:
        - path
        - message
      title: ErrorDetail
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: onehot_sk_...
      description: Create an API key in the console. Required when accounts are enabled.

````

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