> ## 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
> 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; V2 is the lower-cost option for simple tasks. Keep V3 examples explicitly versioned. The open-source browser-use library and hosted browser-use-sdk have different APIs.
> 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 completed run or closed CDP connection does not immediately stop its cloud 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, is_done only reports a terminal done action. is_successful is the agent-reported outcome; verify important external actions independently. Cloud timeout, API client timeout, model timeout, and task completion are separate concepts.
> 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.

# Supported Models

> Choose between Claude, Gemini, Llama, DeepSeek, and more. Configuration examples for each provider.

Browser Use natively supports 15+ LLM providers. Most providers accept any model string. Check each provider's docs to see which models are available.

> **Which model should I use?** See our [benchmark results and recommendations](https://browser-use.com/posts/what-model-to-use) for detailed comparisons across real-world browser tasks.

### Browser Use [example](https://github.com/browser-use/browser-use/blob/main/examples/models/browser_use_llm.py)

`ChatBrowserUse()` is our optimized in-house model, matching the accuracy of top models while completing tasks **3-5x** faster. [See our blog post→](https://browser-use.com/posts/speed-matters)

<Info>
  Read the [bu-2-0 model card](/open-source/bu-2-0-model-card) for details on intended use, inputs and outputs, tools, benchmarks, judge setup, and limitations.
</Info>

```python theme={null}
from browser_use import Agent, ChatBrowserUse

# Initialize the model - defaults to bu-latest (bu-2-0)
llm = ChatBrowserUse()

# Create agent with the model
agent = Agent(
    task="...", # Your task here
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
BROWSER_USE_API_KEY=
```

Get your API key from the [Browser Use Cloud](https://cloud.browser-use.com/new-api-key). Eligible new accounts receive \$15 in one-time credits.

#### Pricing

ChatBrowserUse offers competitive pricing per 1 million tokens:

**bu-2-0 / bu-latest (Default)**

| Token Type    | Price per 1M tokens |
| ------------- | ------------------- |
| Input tokens  | \$0.60              |
| Cached tokens | \$0.06              |
| Output tokens | \$3.50              |

**bu-1-0**

Since May 20, 2026, `bu-1-0` is priced the same as `bu-2-0`:

| Token Type    | Price per 1M tokens |
| ------------- | ------------------- |
| Input tokens  | \$0.60              |
| Cached tokens | \$0.06              |
| Output tokens | \$3.50              |

<h3 id="google-gemini">
  Google Gemini [example](https://github.com/browser-use/browser-use/blob/main/examples/models/gemini.py)
</h3>

[Available models](https://ai.google.dev/api/models). Also supports Gemma models and Vertex AI via `ChatGoogle(model="...", vertexai=True)`.

<Warning>
  `GEMINI_API_KEY` is deprecated and should be named `GOOGLE_API_KEY` as of 2025-05.
</Warning>

```python theme={null}
from browser_use import Agent, ChatGoogle
from dotenv import load_dotenv

# Read GOOGLE_API_KEY into env
load_dotenv()

# Initialize the model
llm = ChatGoogle(model='gemini-2.5-flash')

# Create agent with the model
agent = Agent(
    task="Your task here",
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
GOOGLE_API_KEY=
```

### OpenAI [example](https://github.com/browser-use/browser-use/blob/main/examples/models/gpt-5-mini.py)

[Available models](https://platform.openai.com/docs/models)

```python theme={null}
from browser_use import Agent, ChatOpenAI

# Initialize the model
llm = ChatOpenAI(
    model="gpt-5",
)

# Create agent with the model
agent = Agent(
    task="...", # Your task here
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
OPENAI_API_KEY=
```

<Info>
  You can use any OpenAI compatible model by passing the model name to the `ChatOpenAI` class using a custom URL (or any other parameter that would go into the normal OpenAI API call).
</Info>

### Anthropic [example](https://github.com/browser-use/browser-use/blob/main/examples/models/claude-4-sonnet.py)

[Available models](https://docs.anthropic.com/en/docs/about-claude/models). Coordinate clicking is automatically enabled for `claude-sonnet-4-*` and `claude-opus-4-*` models.

```python theme={null}
from browser_use import Agent, ChatAnthropic

# Initialize the model
llm = ChatAnthropic(
    model="claude-sonnet-4-6",
)

# Create agent with the model
agent = Agent(
    task="...", # Your task here
    llm=llm
)
```

And add the variable:

```bash .env theme={null}
ANTHROPIC_API_KEY=
```

<h3 id="azure-openai">
  Azure OpenAI [example](https://github.com/browser-use/browser-use/blob/main/examples/models/azure_openai.py)
</h3>

[Available models](https://learn.microsoft.com/en-us/azure/foundry/foundry-models/concepts/models-sold-directly-by-azure)

```python theme={null}
from browser_use import Agent, ChatAzureOpenAI
from pydantic import SecretStr
import os

# Initialize the model
llm = ChatAzureOpenAI(
    model="o4-mini",
)

# Create agent with the model
agent = Agent(
    task="...", # Your task here
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
AZURE_OPENAI_API_KEY=
```

#### Using the Responses API (for GPT-5.1 Codex models)

<Info>
  Azure OpenAI now requires `api_version >= 2025-03-01-preview` for certain models like `gpt-5.1-codex-mini`. These models only support the [Responses API](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/responses) instead of the Chat Completions API.
</Info>

Browser Use automatically detects and uses the Responses API for these models:

* `gpt-5.1-codex`, `gpt-5.1-codex-mini`, `gpt-5.1-codex-max`
* `gpt-5-codex`, `codex-mini-latest`
* `computer-use-preview`

```python theme={null}
from browser_use import Agent, ChatAzureOpenAI

# Auto-detection (recommended) - uses Responses API for gpt-5.1-codex-mini
llm = ChatAzureOpenAI(
    model="gpt-5.1-codex-mini",
    api_version="2025-03-01-preview",  # Required for Responses API
)

# Or explicitly enable/disable Responses API for any model
llm = ChatAzureOpenAI(
    model="gpt-4o",
    api_version="2025-03-01-preview",
    use_responses_api=True,  # Force Responses API (True/False/'auto')
)

agent = Agent(
    task="...",
    llm=llm
)
```

The `use_responses_api` parameter accepts:

* `'auto'` (default): Automatically uses Responses API for models that require it
* `True`: Force use of the Responses API
* `False`: Force use of the Chat Completions API

<h3 id="aws-bedrock">
  AWS Bedrock [example](https://github.com/browser-use/browser-use/blob/main/examples/models/aws.py)
</h3>

[Available models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html). AWS Bedrock provides access to multiple model providers through a single API. We support both a general AWS Bedrock client and provider-specific convenience classes. Install with `pip install "browser-use[aws]"`.

#### General AWS Bedrock (supports all providers)

```python theme={null}
from browser_use import Agent
from browser_use.llm import ChatAWSBedrock

# Works with any Bedrock model (Anthropic, Meta, AI21, etc.)
llm = ChatAWSBedrock(
    model="anthropic.claude-3-5-sonnet-20240620-v1:0",  # or any Bedrock model
    aws_region="us-east-1",
)

# Create agent with the model
agent = Agent(
    task="Your task here",
    llm=llm
)
```

#### Anthropic Claude via AWS Bedrock (convenience class)

```python theme={null}
from browser_use import Agent
from browser_use.llm import ChatAnthropicBedrock

# Anthropic-specific class with Claude defaults
llm = ChatAnthropicBedrock(
    model="anthropic.claude-3-5-sonnet-20240620-v1:0",
    aws_region="us-east-1",
)

# Create agent with the model
agent = Agent(
    task="Your task here",
    llm=llm
)
```

#### AWS Authentication

Required environment variables:

```bash .env theme={null}
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
```

You can also use AWS profiles or IAM roles instead of environment variables. The implementation supports:

* Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`)
* AWS profiles and credential files
* IAM roles (when running on EC2)
* Session tokens for temporary credentials
* AWS SSO authentication (`aws_sso_auth=True`)

<h2 id="vercel">
  Vercel AI Gateway [example](https://github.com/browser-use/browser-use/blob/main/examples/models/vercel_ai_gateway.py)
</h2>

[Available models](https://vercel.com/ai-gateway/models). Vercel AI Gateway provides an OpenAI-compatible API endpoint that acts as a proxy to various AI providers, with features like rate limiting, caching, and monitoring.

```python theme={null}
from browser_use import Agent, ChatVercel
from dotenv import load_dotenv
import os

load_dotenv()

# Get API key (https://vercel.com/ai-gateway)
api_key = os.getenv('VERCEL_API_KEY')
if not api_key:
    raise ValueError('VERCEL_API_KEY is not set')

# Basic usage
llm = ChatVercel(
    model='openai/gpt-4o',
    api_key=api_key,
)

# With provider options - control which providers are used and in what order
# This will try Vertex AI first, then fall back to Anthropic if Vertex fails
llm_with_provider_options = ChatVercel(
    model='anthropic/claude-sonnet-4',
    api_key=api_key,
    provider_options={
        'gateway': {
            'order': ['vertex', 'anthropic']  # Try Vertex AI first, then Anthropic
        }
    },
)

agent = Agent(
    task="Your task here",
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
VERCEL_API_KEY=
```

<h2 id="groq">
  Groq [example](https://github.com/browser-use/browser-use/blob/main/examples/models/llama4-groq.py)
</h2>

[Available models](https://console.groq.com/docs/models)

```python theme={null}
from browser_use import Agent, ChatGroq

llm = ChatGroq(model="meta-llama/llama-4-maverick-17b-128e-instruct")

agent = Agent(
    task="Your task here",
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
GROQ_API_KEY=
```

<h2 id="oci">
  Oracle Cloud Infrastructure (OCI) [example](https://github.com/browser-use/browser-use/blob/main/examples/models/oci_models.py)
</h2>

[Available models](https://docs.oracle.com/en-us/iaas/Content/generative-ai/imported-models.htm). OCI provides access to various generative AI models including Meta Llama, Cohere, and other providers through their Generative AI service. Install with `pip install "browser-use[oci]"`.

```python theme={null}
from browser_use import Agent, ChatOCIRaw

# Initialize the OCI model
llm = ChatOCIRaw(
    model_id="ocid1.generativeaimodel.oc1.us-chicago-1.amaaaaaask7dceya...",
    service_endpoint="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com",
    compartment_id="ocid1.tenancy.oc1..aaaaaaaayeiis5uk2nuubznrekd...",
    provider="meta",  # or "cohere"
    temperature=0.7,
    max_tokens=800,
    top_p=0.9,
    auth_type="API_KEY",
    auth_profile="DEFAULT"
)

# Create agent with the model
agent = Agent(
    task="Your task here",
    llm=llm
)
```

Required setup:

1. Set up OCI configuration file at `~/.oci/config`
2. Have access to OCI Generative AI models in your tenancy
3. Install the OCI Python SDK: `uv add oci` or `pip install oci`

Authentication methods supported:

* `API_KEY`: Uses API key authentication (default)
* `INSTANCE_PRINCIPAL`: Uses instance principal authentication
* `RESOURCE_PRINCIPAL`: Uses resource principal authentication

## Ollama

[Available models](https://ollama.com/library).

1. Install Ollama: [https://github.com/ollama/ollama](https://github.com/ollama/ollama)
2. Run `ollama serve` to start the server
3. In a new terminal, install the model you want to use: `ollama pull llama3.1:8b` (this has 4.9GB)

```python theme={null}
from browser_use import Agent, ChatOllama

llm = ChatOllama(model="llama3.1:8b")
```

## Langchain

[Example](https://github.com/browser-use/browser-use/blob/main/examples/models/langchain) on how to use Langchain with Browser Use.

## Qwen [example](https://github.com/browser-use/browser-use/blob/main/examples/models/qwen.py)

Currently, only `qwen-vl-max` is recommended for Browser Use. Other Qwen models, including `qwen-max`, have issues with the action schema format. Smaller Qwen models may return incorrect action schema formats (e.g., `actions: [{"navigate": "google.com"}]` instead of `[{"navigate": {"url": "google.com"}}]`). If you want to use other models, add concrete examples of the correct action format to your prompt.

```python theme={null}
from browser_use import Agent, ChatOpenAI
from dotenv import load_dotenv
import os

load_dotenv()

# Get API key from https://modelstudio.console.alibabacloud.com/?tab=playground#/api-key
api_key = os.getenv('ALIBABA_CLOUD')
base_url = 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1'

llm = ChatOpenAI(model='qwen-vl-max', api_key=api_key, base_url=base_url)

agent = Agent(
    task="Your task here",
    llm=llm,
    use_vision=True
)
```

Required environment variables:

```bash .env theme={null}
ALIBABA_CLOUD=
```

## ModelScope [example](https://github.com/browser-use/browser-use/blob/main/examples/models/modelscope_example.py)

```python theme={null}
from browser_use import Agent, ChatOpenAI
from dotenv import load_dotenv
import os

load_dotenv()

# Get API key from https://www.modelscope.cn/docs/model-service/API-Inference/intro
api_key = os.getenv('MODELSCOPE_API_KEY')
base_url = 'https://api-inference.modelscope.cn/v1/'

llm = ChatOpenAI(model='Qwen/Qwen2.5-VL-72B-Instruct', api_key=api_key, base_url=base_url)

agent = Agent(
    task="Your task here",
    llm=llm,
    use_vision=True
)
```

Required environment variables:

```bash .env theme={null}
MODELSCOPE_API_KEY=
```

<h2 id="deepseek">
  DeepSeek [example](https://github.com/browser-use/browser-use/blob/main/examples/models/deepseek-chat.py)
</h2>

[Available models](https://api-docs.deepseek.com/quick_start/pricing)

```python theme={null}
from browser_use import Agent, ChatDeepSeek

llm = ChatDeepSeek(model="deepseek-chat")

agent = Agent(
    task="Your task here",
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
DEEPSEEK_API_KEY=
```

<h2 id="mistral">
  Mistral [example](https://github.com/browser-use/browser-use/blob/main/examples/models/mistral.py)
</h2>

[Available models](https://docs.mistral.ai/getting-started/models/models_overview/)

```python theme={null}
from browser_use import Agent, ChatMistral

llm = ChatMistral(model="mistral-large-latest")

agent = Agent(
    task="Your task here",
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
MISTRAL_API_KEY=
```

<h2 id="cerebras">
  Cerebras [example](https://github.com/browser-use/browser-use/blob/main/examples/models/cerebras_example.py)
</h2>

[Available models](https://inference-docs.cerebras.ai/models/overview)

```python theme={null}
from browser_use import Agent, ChatCerebras

llm = ChatCerebras(model="llama3.3-70b")

agent = Agent(
    task="Your task here",
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
CEREBRAS_API_KEY=
```

<h2 id="openrouter">
  OpenRouter [example](https://github.com/browser-use/browser-use/blob/main/examples/models/openrouter.py)
</h2>

[Available models](https://openrouter.ai/models). Access 300+ models from any provider through a single API.

```python theme={null}
from browser_use import Agent, ChatOpenRouter

llm = ChatOpenRouter(model="anthropic/claude-sonnet-4-6")

agent = Agent(
    task="Your task here",
    llm=llm
)
```

Required environment variables:

```bash .env theme={null}
OPENROUTER_API_KEY=
```

<h2 id="litellm">
  LiteLLM
</h2>

Requires separate install (`pip install litellm`). Supports any [LiteLLM model string](https://docs.litellm.ai/docs/providers) — useful when you need a provider not covered by the native integrations above.

```python theme={null}
from browser_use import Agent
from browser_use.llm.litellm import ChatLiteLLM

llm = ChatLiteLLM(model="openai/gpt-5")

agent = Agent(
    task="Your task here",
    llm=llm
)
```

## Other OpenAI-Compatible Providers

Any provider with an OpenAI-compatible endpoint works via `ChatOpenAI` with a custom `base_url`:

**Examples available:**

* [Novita](https://github.com/browser-use/browser-use/blob/main/examples/models/novita.py)
