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

# Obter saldo

> Confira os fundos do seu Workspace e quanto está disponível para novos Runs. Esta solicitação gratuita também confirma que sua Key funciona.



## OpenAPI

````yaml /openapi.pt.json get /v1/balance
openapi: 3.1.0
info:
  title: Glasser
  version: 0.0.1
  description: >-
    Uma chave, sem contrato, pagamento por chamada, para todas as APIs pagas
    adquiridas no atacado. Cada resposta contém x-request-id; cada corpo de erro
    contém o mesmo envelope.
servers:
  - url: https://api.glasser.ai
security: []
tags:
  - name: Solutions
  - name: Endpoints
  - name: Runs
  - name: Balance
paths:
  /v1/balance:
    get:
      tags:
        - Balance
      summary: Obter saldo
      description: >-
        Confira os fundos do seu Workspace e quanto está disponível para novos
        Runs. Esta solicitação gratuita também confirma que sua Key funciona.
      operationId: balance
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  balance_usd:
                    type: string
                    pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                    description: >-
                      Fundos liquidados no Workspace, incluindo os fundos
                      atualmente retidos para Runs.
                  held_usd:
                    type: string
                    pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                    description: >-
                      Fundos reservados para Runs não concluídos. Um Hold não é
                      uma cobrança.
                  available_usd:
                    type: string
                    pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                    description: >-
                      Fundos disponíveis para novos Runs: balance_usd menos
                      held_usd.
                  first_run_reward:
                    anyOf:
                      - type: object
                        properties:
                          amount_usd:
                            type: string
                            pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                            description: >-
                              String decimal exata em USD (mínimo de 2 e máximo
                              de 6 casas decimais, uma única grafia canônica).
                              Some usando aritmética decimal ou multiplique por
                              10^6 — nunca use números de ponto flutuante.
                          expires_at:
                            anyOf:
                              - type: string
                                description: Timestamp UTC ISO-8601
                                format: date-time
                              - type: 'null'
                          description:
                            type: string
                            description: >-
                              Explicação da recompensa exibida ao usuário para o
                              estado atual, gerada pelo servidor.
                        required:
                          - amount_usd
                          - expires_at
                          - description
                        additionalProperties: false
                        description: >-
                          Uma recompensa extra pelo seu primeiro Run concluído,
                          além do Grant de cadastro. Comece antes de expires_at
                          para receber o valor exibido; uma expiração null
                          significa que a recompensa exibida não tem prazo.
                          Omitida quando indisponível ou já recebida.
                      - type: 'null'
                  client:
                    type: object
                    properties:
                      client_version:
                        anyOf:
                          - type: string
                          - type: 'null'
                      minimum_version:
                        type: string
                      latest_version:
                        type: string
                      upgrade_command:
                        type: string
                      reason:
                        type: string
                    required:
                      - client_version
                      - minimum_version
                      - latest_version
                      - upgrade_command
                      - reason
                    additionalProperties: false
                required:
                  - balance_usd
                  - held_usd
                  - available_usd
                additionalProperties: false
        '400':
          description: ValidationFailed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationFailedEncoded'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedEncoded'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenEncoded'
        '429':
          description: RateLimited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedEncoded'
      security:
        - bearer: []
components:
  schemas:
    ValidationFailedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - validation_failed
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    UnauthorizedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    ForbiddenEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - forbidden
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    RateLimitedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - rate_limited
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: Bearer

````

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