> ## 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.

# Listar histórico do saldo

> Revise cobranças, reembolsos, recargas, Grants e ajustes, dos mais recentes aos mais antigos. Cada entrada mostra o valor e o saldo depois dela. Filtre por tipo e use next_cursor para ler a próxima página.



## OpenAPI

````yaml /openapi.pt.json get /v1/balance/history
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/history:
    get:
      tags:
        - Balance
      summary: Listar histórico do saldo
      description: >-
        Consulte cobranças, reembolsos, recargas, Grants e ajustes, do mais
        recente para o mais antigo. Cada entrada mostra o valor e o saldo após a
        operação. Filtre por kind e use next_cursor para ler a próxima página.
      operationId: balance-history
      parameters:
        - name: limit
          in: query
          schema:
            type: string
            pattern: ^[+-]?\d*\.?\d+(?:[Ee][+-]?\d+)?$
          required: false
        - name: cursor
          in: query
          schema:
            anyOf:
              - type: string
                description: >-
                  Envie next_cursor da resposta anterior para ler a próxima
                  página.
              - type: 'null'
          required: false
        - name: kind
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - charge
                  - refund
                  - topup
                  - grant
                  - adjustment
              - type: 'null'
          required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        kind:
                          type: string
                          enum:
                            - charge
                            - refund
                            - topup
                            - grant
                            - adjustment
                        amount_usd:
                          type: string
                          pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                        balance_after_usd:
                          type: string
                          pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          description: Saldo do Workspace após esta entrada.
                        run_id:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            Run relacionado a uma cobrança ou reembolso; null
                            quando nenhum Run está associado.
                        description:
                          type: string
                        created_at:
                          type: string
                          description: Timestamp UTC ISO-8601
                          format: date-time
                      required:
                        - id
                        - kind
                        - amount_usd
                        - balance_after_usd
                        - run_id
                        - description
                        - created_at
                      additionalProperties: false
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Cursor da próxima página. Null quando não há mais
                      entradas.
                  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:
                  - data
                  - next_cursor
                additionalProperties: false
        '400':
          description: ValidationFailed
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ValidationFailedEncoded'
                  - $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.