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

# Get wallet

> Get the caller's wallet: current balance, auto-reload configuration, per-product Metronome contract rates, and any in-flight top-up.



## OpenAPI

````yaml https://agent.tinyfish.ai/v1/openapi/main get /v1/wallet
openapi: 3.0.0
info:
  title: TinyFish Web Agent Automation API
  version: 1.0.0
  description: >-
    REST API for running AI-powered browser automations. Execute tasks on any
    website using natural language instructions.
  contact:
    name: TinyFish Support
    email: support@tinyfish.ai
servers:
  - url: https://agent.tinyfish.ai
    description: Production
security: []
tags:
  - name: Automation
    description: Browser automation endpoints for executing tasks on websites
  - name: Runs
    description: Endpoints for retrieving automation run data
  - name: Browser
    description: Remote browser session endpoints
  - name: Fetch
    description: Fetch URLs and extract clean page content
  - name: Search
    description: Web search endpoints
  - name: Browser Context Profiles
    description: >-
      Saved browser context endpoints for managing reusable login state,
      cookies, storage, and profile setup sessions
  - name: Vault
    description: >-
      Vault credential management endpoints for connecting password managers and
      managing stored credentials
  - name: Wallet
    description: Wallet balance, auto-reload, rates, and top-up endpoints
paths:
  /v1/wallet:
    get:
      tags:
        - Wallet
      summary: Get wallet
      description: >-
        Get the caller's wallet: current balance, auto-reload configuration,
        per-product Metronome contract rates, and any in-flight top-up.
      operationId: getWallet
      responses:
        '200':
          description: Wallet details
          content:
            application/json:
              schema:
                type: object
                properties:
                  available_balance:
                    type: string
                    pattern: ^-?(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                    description: >-
                      Current spendable balance, denominated in `currency`. A
                      negative value means the wallet is overdrawn.
                    example: '21.44'
                  currency:
                    type: string
                    enum:
                      - USD
                    example: USD
                  as_of:
                    type: string
                    format: date-time
                    example: '2026-08-10T18:04:11.220Z'
                  auto_reload:
                    oneOf:
                      - type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - unconfigured
                        required:
                          - state
                        description: Auto-reload has never been configured for this wallet.
                      - type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - 'on'
                          threshold:
                            type: string
                            pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                            description: >-
                              Balance floor that triggers a reload, denominated
                              in the response's `currency`.
                            example: '10.00'
                          recharge_to:
                            type: string
                            pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                            description: >-
                              Balance the wallet is topped up to when a reload
                              triggers, denominated in the response's
                              `currency`.
                            example: '50.00'
                        required:
                          - state
                          - threshold
                          - recharge_to
                        description: Auto-reload is configured, current state "on".
                      - type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - 'off'
                          threshold:
                            type: string
                            pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                            description: >-
                              Balance floor that triggers a reload, denominated
                              in the response's `currency`.
                            example: '10.00'
                          recharge_to:
                            type: string
                            pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                            description: >-
                              Balance the wallet is topped up to when a reload
                              triggers, denominated in the response's
                              `currency`.
                            example: '50.00'
                        required:
                          - state
                          - threshold
                          - recharge_to
                        description: Auto-reload is configured, current state "off".
                      - type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - paused_payment_failed
                          threshold:
                            type: string
                            pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                            description: >-
                              Balance floor that triggers a reload, denominated
                              in the response's `currency`.
                            example: '10.00'
                          recharge_to:
                            type: string
                            pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                            description: >-
                              Balance the wallet is topped up to when a reload
                              triggers, denominated in the response's
                              `currency`.
                            example: '50.00'
                        required:
                          - state
                          - threshold
                          - recharge_to
                        description: >-
                          Auto-reload is configured, current state
                          "paused_payment_failed".
                      - type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - needs_payment_method
                          threshold:
                            type: string
                            pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                            description: >-
                              Balance floor that triggers a reload, denominated
                              in the response's `currency`.
                            example: '10.00'
                          recharge_to:
                            type: string
                            pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                            description: >-
                              Balance the wallet is topped up to when a reload
                              triggers, denominated in the response's
                              `currency`.
                            example: '50.00'
                        required:
                          - state
                          - threshold
                          - recharge_to
                        description: >-
                          Auto-reload is configured, current state
                          "needs_payment_method".
                      - nullable: true
                    description: >-
                      null means the auto-reload contract read failed, not that
                      it is unconfigured.
                  pending_top_up:
                    type: object
                    nullable: true
                    properties:
                      amount:
                        type: string
                        pattern: ^(?=.*[1-9])(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                        description: >-
                          Amount of the in-flight top-up, denominated in the
                          response's `currency`.
                        example: '50.00'
                      started_at:
                        type: string
                        format: date-time
                        example: '2026-08-10T18:02:55.000Z'
                    required:
                      - amount
                      - started_at
                    description: null means no in-flight top-up, or the ledger read failed.
                  rates:
                    type: object
                    nullable: true
                    properties:
                      meters:
                        type: array
                        items:
                          type: object
                          properties:
                            product_id:
                              type: string
                              description: Metronome product ID.
                              example: prod_agent
                            label:
                              type: string
                              description: Human-readable meter label.
                              example: Agent steps
                            unit_amount:
                              type: string
                              pattern: ^(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$
                              description: Per-unit rate, decimal USD string.
                              example: '0.016000'
                            currency:
                              type: string
                              enum:
                                - USD
                              example: USD
                            per:
                              type: string
                              description: >-
                                Billable unit this meter charges per (e.g.
                                "step"). Absent when unlabeled.
                              example: step
                          required:
                            - product_id
                            - label
                            - unit_amount
                            - currency
                          description: >-
                            One priced product on the caller's Metronome
                            contract.
                      as_of:
                        type: string
                        format: date-time
                        example: '2026-08-10T18:04:11.220Z'
                      source:
                        type: string
                        enum:
                          - metronome-contract
                        description: >-
                          Rate provenance — the live per-customer Metronome
                          contract rate schedule.
                    required:
                      - meters
                      - as_of
                      - source
                    description: >-
                      null means the rates read failed, or the wallet has no
                      Metronome contract yet.
                required:
                  - available_balance
                  - currency
                  - as_of
                  - auto_reload
                  - pending_top_up
                  - rates
                description: >-
                  Wallet balance, auto-reload, per-product rates, and any
                  in-flight top-up.
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - MISSING_API_KEY
                          - INVALID_API_KEY
                          - INVALID_INPUT
                          - RATE_LIMIT_EXCEEDED
                          - INTERNAL_ERROR
                          - RETRY_REQUIRED
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - SERVICE_BUSY
                          - TIMEOUT
                          - INSUFFICIENT_CREDITS
                          - CONTENT_POLICY_VIOLATION
                          - MAX_STEPS_EXCEEDED
                          - SITE_BLOCKED
                          - TASK_FAILED
                          - CANCELLED
                        description: Machine-readable error code
                        example: INVALID_INPUT
                      message:
                        type: string
                        description: Human-readable error message
                        example: Field "url" is required and must be a string
                      details:
                        nullable: true
                        description: Additional error details (validation errors, etc.)
                    required:
                      - code
                      - message
                  request_id:
                    type: string
                    description: >-
                      Request correlation ID, also returned as the X-Request-ID
                      response header. Include it when reporting issues.
                    example: 8f9dba20-e37b-4749-a919-2269e28b4a2c
                required:
                  - error
                description: Standard error response format
        '404':
          description: >-
            No wallet found for this account (legacy billing, or no Metronome
            customer yet)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - MISSING_API_KEY
                          - INVALID_API_KEY
                          - INVALID_INPUT
                          - RATE_LIMIT_EXCEEDED
                          - INTERNAL_ERROR
                          - RETRY_REQUIRED
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - SERVICE_BUSY
                          - TIMEOUT
                          - INSUFFICIENT_CREDITS
                          - CONTENT_POLICY_VIOLATION
                          - MAX_STEPS_EXCEEDED
                          - SITE_BLOCKED
                          - TASK_FAILED
                          - CANCELLED
                        description: Machine-readable error code
                        example: INVALID_INPUT
                      message:
                        type: string
                        description: Human-readable error message
                        example: Field "url" is required and must be a string
                      details:
                        nullable: true
                        description: Additional error details (validation errors, etc.)
                    required:
                      - code
                      - message
                  request_id:
                    type: string
                    description: >-
                      Request correlation ID, also returned as the X-Request-ID
                      response header. Include it when reporting issues.
                    example: 8f9dba20-e37b-4749-a919-2269e28b4a2c
                required:
                  - error
                description: Standard error response format
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - MISSING_API_KEY
                          - INVALID_API_KEY
                          - INVALID_INPUT
                          - RATE_LIMIT_EXCEEDED
                          - INTERNAL_ERROR
                          - RETRY_REQUIRED
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - SERVICE_BUSY
                          - TIMEOUT
                          - INSUFFICIENT_CREDITS
                          - CONTENT_POLICY_VIOLATION
                          - MAX_STEPS_EXCEEDED
                          - SITE_BLOCKED
                          - TASK_FAILED
                          - CANCELLED
                        description: Machine-readable error code
                        example: INVALID_INPUT
                      message:
                        type: string
                        description: Human-readable error message
                        example: Field "url" is required and must be a string
                      details:
                        nullable: true
                        description: Additional error details (validation errors, etc.)
                    required:
                      - code
                      - message
                  request_id:
                    type: string
                    description: >-
                      Request correlation ID, also returned as the X-Request-ID
                      response header. Include it when reporting issues.
                    example: 8f9dba20-e37b-4749-a919-2269e28b4a2c
                required:
                  - error
                description: Standard error response format
        '503':
          description: Wallet balance is temporarily unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - MISSING_API_KEY
                          - INVALID_API_KEY
                          - INVALID_INPUT
                          - RATE_LIMIT_EXCEEDED
                          - INTERNAL_ERROR
                          - RETRY_REQUIRED
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - SERVICE_BUSY
                          - TIMEOUT
                          - INSUFFICIENT_CREDITS
                          - CONTENT_POLICY_VIOLATION
                          - MAX_STEPS_EXCEEDED
                          - SITE_BLOCKED
                          - TASK_FAILED
                          - CANCELLED
                        description: Machine-readable error code
                        example: INVALID_INPUT
                      message:
                        type: string
                        description: Human-readable error message
                        example: Field "url" is required and must be a string
                      details:
                        nullable: true
                        description: Additional error details (validation errors, etc.)
                    required:
                      - code
                      - message
                  request_id:
                    type: string
                    description: >-
                      Request correlation ID, also returned as the X-Request-ID
                      response header. Include it when reporting issues.
                    example: 8f9dba20-e37b-4749-a919-2269e28b4a2c
                required:
                  - error
                description: Standard error response format
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Get your key from the API Keys page.

````