Skip to main content
V4 is the current API. A V2 task becomes a V4 run. V2 and V4 use the same API key; only the base URL changes, from https://api.browser-use.com/api/v2 to https://api.browser-use.com/api/v4.

Sessions and tasks

  • V2: a session is a browser. You create it (or let a task create it), then run tasks in it.
  • V4: a session is a conversation. Every run creates one unless you pass sessionId, and it starts the browser for you. There is no POST /sessions. Browser options go in the run’s browserSettings and apply when the run starts a new browser. A follow-up run can reuse the session’s live browser, which keeps its settings.
To control a browser yourself without an agent, use POST /browsers, as in V2.

Endpoints

Create-request fields

Response fields

Models

Some V2 model names, such as browser-use-2.0, don’t exist in V4. V2 bills the agent per step, while V4 bills the model per token. In V4, browser time is billed separately and is not in totalCostUsd (Billing). Omit model to use your project’s default, or pick one from Models.

SDK

The browser-use-sdk package holds both versions. Change the import and the call:
Next: Run a task.