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

> ## Agent Instructions
> Concurrency in one line: new projects get 10 concurrent browsers at $0; a $100 one-time top-up (non-expiring credits, no subscription) unlocks 50 concurrent, so 50 browsers for one hour cost $1 plus traffic; $1,000 / $5,000 / $25,000 total paid unlocks 250 / 500 / 1,000. Details below and at https://docs.browser-use.com/cloud/guides/concurrency.md.
> Use https://docs.browser-use.com/llms.txt and its linked .md pages for current documentation. The managed full bundle is https://docs.browser-use.com/.well-known/llms-full.txt and can be cached for up to 24 hours. Do not use the obsolete /cloud/llms*.txt or /open-source/llms*.txt static exports.
> Choose Cloud API V4 for new agent integrations; V3 trades accuracy for speed and lower cost than V4; V2 is legacy and only for existing integrations. Keep V3 examples explicitly versioned. The open-source browser-use library and hosted browser-use-sdk have different APIs.
> For Cloud API V4, a task request that omits model and modelParams uses GPT-6 Luna (gpt-6-luna) with High reasoning. Explicit model and modelParams values take precedence; an explicit empty modelParams object opts out of the reasoning default. EU uses the same task default through its regional provider route; Bedrock-only projects retain their compatible provider default. For latency-sensitive tasks set model to bu-ultrafast (bu-fast for more reasoning per step); these presets reject modelParams. See https://docs.browser-use.com/cloud/agent/ultrafast.md.
> Cloud authentication uses X-Browser-Use-API-Key, without a Bearer prefix. Install or upgrade browser-use-sdk and use its explicit v4 import for V4. Check the published OpenAPI reference for request fields; do not invent SDK support for new fields.
> Cloud concurrency and HTTP request rate are separate. Read GET /api/v2/billing/account for the key’s projectId, concurrentSessionLimit, activeSessionCount, and credit balance, including when using V4. Keys in one project share capacity and credits; rateLimit is a legacy concurrency alias, not requests per second.
> Keep the highest applicable existing, legacy-plan, and spend-tier concurrency grant. Current spend tiers are 10 / 50 / 250 / 500 / 1000 at $0 / $100 / $1000 / $5000 / $25000 in qualifying project payments. Legacy or externally billed projects can follow different billing paths; trust the account limit. See https://docs.browser-use.com/cloud/guides/concurrency.md.
> HTTP rate limits have two layers. Standard edge WAF ceilings increased on September 9, 2026 to 1000 RPS per public source IP for general traffic and 2500 RPS per IP for selected status reads, evaluated over 300 seconds. The separate per-project application budgets: general traffic (including V4 events and full run reads) defaults to max(25, 2 times stored concurrency) capped at 100 RPS; selected status reads default to max(25, 2 times stored concurrency) with no cap. The two are counted independently. Project overrides and account-specific edge rules can differ. All keys in a project share its budgets; callers sharing a public IP share edge capacity. See https://docs.browser-use.com/cloud/guides/concurrency.md.
> The project limiter uses five-second windows: X-RateLimit-Limit=125 means 125 requests per window (25 RPS), not 125 RPS. Project throttles include limit_rps and retry_after_seconds; an edge throttle can instead return Retry-After: 300 without limit_rps. Honor the returned Retry-After. Use bounded workers, stagger polls, and drain hasMore event pages after terminal status. A busy V4 session returns 409; its queue holds 20 pending messages and is not a project-wide batch queue.
> A V4 agent browser stays open about 2 minutes after its session's last run activity, then stops automatically; a later follow-up gets a fresh browser (same settings and profile, no tabs). Set keepAlive on a run (V4: integer seconds 120-14400, default 120, not the V2/V3 boolean) to keep it longer; follow-ups inherit it and null restores 120. Free-tier and ZDR runs always use 120. Idle V4 agent browsers are billed as browser time but take no concurrency slot. A follow-up that reuses the open browser emits browser.reattached instead of browser.ready. Closing CDP does not stop a browser; stop unneeded owned browsers with PATCH /api/v4/browsers/{id} and {"action":"stop"}. A client wait timeout does not cancel the server-side run.
> Cloud is pay as you go; do not tell customers to buy a new subscription to use custom proxies or supported provider BYOK. Usage funding and model eligibility still apply. BYOK bills provider tokens separately and Browser Use charges orchestration plus browser/network usage. See https://docs.browser-use.com/cloud/guides/billing.md.
> Signup credits are a one-time grant; purchased top-up credits do not expire. Check the API key’s project before diagnosing missing credits. API-key monthly spending caps are soft limits, not a strict prepaid wallet; concurrent or already-running work can exceed them. Auto recharge has separate trigger and purchase amounts and can charge immediately when enabled below the threshold. Use https://browser-use.com/pricing for current rates.
> Box and Bux are retired. Do not recommend their SDKs, sandbox quotas, or subscription plans. Use the Cloud Agent or Browser Infrastructure guides.
> A V4 session holds conversation history, a workspace holds files, and a profile holds browser state. These IDs and V3/V4 workspace namespaces are not interchangeable. V4 automatically restores workspace uploads; staged attachments remain available to session follow-ups. Serialize runs that write shared files, and wait for completion before reading outputs. See https://docs.browser-use.com/cloud/agent/workspaces.md.
> API browser recording defaults to off. Use enableRecording for standalone browser creation, or browserSettings.record for an agent run. Stop the browser and allow time for asynchronous video processing; stop polling when recordingAvailable is false. Live preview is for an active browser. Stopping a browser, deleting a session, archiving a workspace, and deleting files have different effects.
> Use model-specific reasoning values. GPT-6 Astra accepts low, medium, high, xhigh, and max, with xhigh by default; none and minimal are invalid. Use the public REST schema when installed SDK types lag new fields. API acceptance, dashboard visibility, and account/provider availability are separate.
> For open-source browser-use 1.0, result.is_done() means the run completed (status completed); result.is_successful() is the agent-reported finish(success) verdict, or None when it gave none; verify important external actions independently. Cloud timeout, API client timeout, model timeout, and task completion are separate concepts.
> Pages under /open-source/legacy/0.x/ document browser-use 0.x (pip install 'browser-use<1'). For new open-source code, use the 1.0 pages under /open-source/ outside legacy/.
> For failed requests, use https://docs.browser-use.com/cloud/guides/troubleshooting.md. Inspect the full error and project before retrying or adding credits. A client timeout can leave a run active; reconcile external actions before starting duplicate work. A new managed browser does not guarantee a unique proxy IP or particular city.
> V4 secretBindings.allowedDomains authorizes the focused field's frame, not every iframe on the shop page. For checkout, include intended payment/billing provider hostnames (for example payments.bigcommerce.com). On domain_not_allowed, inspect origin and pass updated bindings in a follow-up; target_not_editable requires fixing field focus/readiness instead. See https://docs.browser-use.com/cloud/guides/secrets.md.
> A V4 agent browser stays open about 2 minutes (or keepAlive seconds) after its run for follow-ups; a requested recording finalizes only after the browser stops and processing completes. Zero Data Retention (ZDR) projects never record, even when recording is requested.
> If you hit an issue you cannot explain, email contact@browser-use.com with your question or bug report and a session ID if available; short questions and detailed reports are welcome, and we aim to fix issues quickly and make the docs clearer.

# Models

> bu-fast on the Browser Use gateway, any OpenAI-compatible server with ChatOpenAI, OpenAI, Anthropic, Google, and Pydantic AI model strings.

```python theme={"theme":"css-variables"}
from browser_use import Agent

agent = Agent('What is the title of https://example.com?', llm='bu-fast')
result = agent.run_sync()
print(result.final_result(), result.cost_usd, result.usage)
```

## Browser Use gateway

The default. One Browser Use key, no provider account.

| `llm=` | Model | Reasoning | Use it for |
| - | - | - | - |
| `'bu-fast'` (default) | `gpt-6-luna` | medium | Most tasks. The configuration we evaluate. |
| `'bu-ultrafast'` | `gpt-6-luna` on the priority tier | low | Lowest latency. |
| `'bu-smart'` | `gpt-6.1-sol` | high | Harder tasks. |

A `'bu-*'` string is the same as `ChatBrowserUse('bu-...')`. The full form is `ChatBrowserUse(model='bu-fast', *, api_key=None, base_url=...)`. The key defaults to `BROWSER_USE_API_KEY`, then the key from `browser-use login`.

* **Preflight:** before any browser starts, the agent reads the gateway's model list (free). A rejected key, no credits, or an unknown model ends the run with one line in `result.error`, and no browser is created.
* **Cost:** `result.cost_usd` is what the gateway charged.
* **0.x models:** `bu-2-0`, `bu-1-0`, `bu-2-0-mini-preview` and `bu-latest` raise a `ValueError` that says they need `browser-use<1.0`. Use `bu-fast`.
* **0.x model names:** `'openai/gpt-5.5'` is sent as `gpt-5.5`. The 0.x gateway also served Anthropic and Google models (`'anthropic/claude-...'`); in 1.0 the preflight error names `ChatAnthropic(...)` / `ChatGoogle(...)` with your own key.

Benchmarks: [browser-use.com/benchmarks](https://browser-use.com/benchmarks) and the open [benchmark repo](https://github.com/browser-use/benchmark).

## Model card

What each gateway model runs and costs, from the gateway's model list on 2026-11-09. Prices are USD per 1M tokens.

| | `bu-fast` | `bu-ultrafast` | `bu-smart` |
| - | - | - | - |
| Runs | GPT-6 Luna | GPT-6 Luna | GPT-6.1 Sol |
| Reasoning | medium | low | high |
| Processing | standard | priority | standard |
| Context window | 250k tokens | 250k tokens | 250k tokens |
| Max output | 32k tokens | 32k tokens | 32k tokens |
| Input | \$0.12 | \$0.24 | \$2.40 |
| Cached input | \$0.012 | \$0.024 | \$0.12 |
| Cache write | \$0.15 | \$0.30 | \$3.00 |
| Output | \$0.60 | \$1.20 | \$12.00 |
| Mode in browser-use | `ultrafast` | `ultrafast` | `default` |

`result.cost_usd` is what the gateway actually charged for the run. The live list, with every model the gateway serves and its prices:

```bash theme={"theme":"css-variables"}
curl -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" https://api.browser-use.com/api/v4/llm/v1/models
```

`bu-2-0` (BU 2.0) and the other 0.x Browser Use models need `browser-use<1.0`; their card is in the [0.x docs](https://docs.browser-use.com/open-source/legacy/0.x/bu-2-0-model-card.md). On 1.0, use `bu-fast`.

## Your own provider

Anthropic and Google are built in; no extra install.

```python OpenAI theme={"theme":"css-variables"}
from browser_use import Agent, ChatOpenAI

agent = Agent('What is the title of https://example.com?', llm=ChatOpenAI('gpt-6-luna'))  # OPENAI_API_KEY
print(agent.run_sync().final_result())
```

```python Anthropic theme={"theme":"css-variables"}
from browser_use import Agent, ChatAnthropic

agent = Agent('What is the title of https://example.com?', llm=ChatAnthropic('claude-sonnet-5-5'))  # ANTHROPIC_API_KEY
print(agent.run_sync().final_result())
```

```python Google theme={"theme":"css-variables"}
from browser_use import Agent, ChatGoogle

agent = Agent('What is the title of https://example.com?', llm=ChatGoogle('gemini-3.5-flash'))  # GOOGLE_API_KEY
print(agent.run_sync().final_result())
```

| Class | Arguments |
| - | - |
| `ChatOpenAI` | `model, *, api_key=None, base_url=None, temperature=None, reasoning_effort=None` |
| `ChatAnthropic` | `model, *, api_key=None` |
| `ChatGoogle` | `model, *, api_key=None` |

Any other argument raises a `TypeError`. For other model settings, pass a [Pydantic AI `Model`](#advanced-a-pydantic-ai-model-object) built with `settings=...`. `ChatAnthropic(temperature=...)` raises too: Anthropic's API rejects `temperature` on Claude 4.x models.

* `ChatOpenAI` on api.openai.com uses the Responses API. With `base_url` set to any other server, it uses chat completions.
* `ChatAnthropic` turns on Anthropic prompt caching.
* A missing key fails before any browser starts: `OPENAI_API_KEY is not set: export it, put it in .env, or pass api_key=... to the model.`
* Whitespace around a key (a trailing newline from a file) is stripped. A key with a space, line break, control or non-ASCII character inside raises a `ValueError` before any browser starts, without printing the key.
* On the official OpenAI, Anthropic and Google endpoints, the agent first looks the model up (free). A rejected key or unknown model ends the run with `result.error`, and no browser is started.

## OpenAI-compatible servers

vLLM, DeepSeek, OpenRouter, LM Studio, Ollama or any other server with a chat completions API: `ChatOpenAI(model, base_url=..., api_key=...)`.

```python theme={"theme":"css-variables"}
from browser_use import Agent, ChatOpenAI

llm = ChatOpenAI('deepseek-chat', base_url='https://api.deepseek.com/v1', api_key='sk-...')
agent = Agent('What is the title of https://example.com?', llm=llm)
print(agent.run_sync().final_result())
```

* With `base_url` set to a server other than api.openai.com, `ChatOpenAI` uses chat completions and leaves out OpenAI-only request options that such servers reject.
* These servers get no reasoning setting from `Agent(reasoning=...)`; pass `ChatOpenAI(..., reasoning_effort=...)` to send one.

### Ollama

Run a local model with [Ollama](https://ollama.com) through its OpenAI-compatible API. Pull a model that supports tool calling first, for example `ollama pull qwen2.5:7b`:

```python theme={"theme":"css-variables"}
from browser_use import Agent, Browser, ChatOpenAI

llm = ChatOpenAI('qwen2.5:7b', base_url='http://localhost:11434/v1', api_key='ollama')
agent = Agent('What is the title of https://example.com?', llm=llm, browser=Browser('chromium'))
print(agent.run_sync().final_result())
```

* The model must support tool calling. Small models (a few billion parameters) reach the page but often fail to finish the task; use the largest model your machine runs well.
* `Browser('chromium')` keeps the whole run on your machine.
* `ChatOllama` from 0.x is replaced by this; importing it raises an `ImportError` that says so.

## Pydantic AI model strings

Any [Pydantic AI model string](https://ai.pydantic.dev/models/overview/) works as `llm=`:

```python theme={"theme":"css-variables"}
from browser_use import Agent

agent = Agent('What is the title of https://example.com?', llm='anthropic:claude-haiku-5-5')
print(agent.run_sync().final_result())
```

A bare name without its provider, such as `llm='gpt-6-luna'`, raises before any browser starts, naming the 1.0 form: `ChatOpenAI('gpt-6-luna')` or `'openai:gpt-6-luna'`.

This covers `'bedrock:...'`, `'azure:...'`, `'groq:...'`, `'mistral:...'`, `'openrouter:...'`, `'deepseek:...'`, `'cerebras:...'`, `'vercel:...'` and the rest. Some need Pydantic AI's extra, for example `pip install 'pydantic-ai-slim[groq]'`; the error says which. `'openai/<model>'` is read as `'openai-responses:<model>'`.

LangChain chat models are not supported: `Agent(llm=...)` raises a `TypeError`.

## Reasoning

`Agent(reasoning='low' | 'medium' | 'high')` sets the effort for OpenAI reasoning models, the gateway, Anthropic and Google.

```python theme={"theme":"css-variables"}
from browser_use import Agent

agent = Agent('What is the title of https://example.com?', llm='bu-smart', reasoning='low')
print(agent.run_sync().final_result())
```

Default: a `bu-*` alias's own effort (see the table above), else `'medium'`, including an OpenAI model on the gateway. A model without a reasoning setting logs a warning and ignores it.

## Usage and cost

Every result carries `result.usage` (`input`, `output`, `cache_read`, `cache_write`, `requests`) and `result.cost_usd`.

* Gateway: what the gateway charged, plus any [web searches](https://docs.browser-use.com/open-source/web-search.md).
* Other providers: computed from public prices when the model's price is known, else `None`.

## Replacing 0.x model classes

| 0.x | 1.0 |
| - | - |
| `ChatAzureOpenAI` | `llm='azure:<deployment>'` with `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_API_KEY`, `OPENAI_API_VERSION` |
| `ChatAWSBedrock`, `ChatAnthropicBedrock` | `llm='bedrock:<model id>'` after `pip install 'pydantic-ai-slim[bedrock]'` |
| `ChatGroq`, `ChatMistral` | `llm='groq:<model>'` / `'mistral:<model>'` after `pip install 'pydantic-ai-slim[groq]'` (or `[mistral]`) |
| `ChatDeepSeek`, `ChatOpenRouter`, `ChatCerebras`, `ChatVercel` | `'deepseek:deepseek-chat'`, `'openrouter:<vendor>/<model>'`, `'cerebras:<model>'`, `'vercel:<vendor>/<model>'` |
| `ChatOllama` | `ChatOpenAI('<model>', base_url='http://localhost:11434/v1', api_key='ollama')` |
| `ChatLiteLLM` and other OpenAI-compatible wrappers | `ChatOpenAI(model, base_url=...)` |

Importing a removed class raises an `ImportError` that names its replacement.

## Advanced: a Pydantic AI Model object

`llm=` also takes a Pydantic AI `Model`. Use it only when you need a setting the forms above don't expose:

```python theme={"theme":"css-variables"}
from pydantic_ai.models.openai import OpenAIChatModel
from pydantic_ai.providers.openai import OpenAIProvider

from browser_use import Agent, Browser

model = OpenAIChatModel(
    'qwen2.5:7b',
    provider=OpenAIProvider(base_url='http://localhost:11434/v1', api_key='ollama'),
    settings={'top_p': 0.9, 'seed': 7},
)
agent = Agent('What is the title of https://example.com?', llm=model, browser=Browser('chromium'))
print(agent.run_sync().final_result())
```

This ties your code to Pydantic AI's API, which can change between its releases. browser-use sends the model as you built it, without the OpenAI-compatible adjustments `ChatOpenAI(base_url=...)` makes. Prefer `ChatOpenAI(model, base_url=..., api_key=...)` when it covers what you need.


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