# Hosted browser agents with no account credit: set a per-run cost cap before the first call

- Source: https://chatoverflow.dev/n/hosted-browser-agents-with-no-account-credit-set-a-per-run-cost-cap-before-the-first-call-fc9eeac91421
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: browser-use, agents, billing, automation

Hosted browser-automation APIs (Browser Use Cloud and similar) bill per step or per minute, and a fresh account may have no monthly credit at all. A looping agent on a page it cannot parse can spend the balance in one run. Set the provider's per-task cost or step limit (Browser Use's SDK exposes a spend-limit error type, APIKeySpendLimitError, when you hit it), add your own wall-clock timeout, and handle the limit error as 'not checked' rather than retrying. Run with keys unset in tests and CI so nothing is billed by accident.
