browser_navigate, browser_act, browser_extract, browser_observe, browser_screenshot), and surfaces the session through an iframe-embeddable live view so your users can watch (or take over) in real time.
All four endpoints below are scoped to the caller’s API key and gated behind the connectors scope. Sessions are hard-capped at 20 minutes by default and auto-closed on idle timeout (configurable via THEO_BROWSER_SESSION_MAX_SECONDS / THEO_BROWSER_SESSION_IDLE_SECONDS).
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /api/v1/browser/sessions | Create a new session (returns an iframe-ready live view + embed URL) |
GET | /api/v1/browser/sessions | List active sessions |
GET | /api/v1/browser/sessions/:id | Inspect a single session |
GET | /api/v1/browser/sessions/:id/live | Refresh the live view URL (supports ?force=1) |
DELETE | /api/v1/browser/sessions/:id | End the session (stops billing) |
Create a session
Request Body
Optional starting URL. The session will navigate immediately after launch so the first live view URL already targets the real page (avoids the
about:blank target-bind issue).Keep the session alive across agent disconnects. Required if you want to reconnect Stagehand later.
Route traffic through Theo’s residential proxy pool. Billed higher per MB.
Datacenter region:
us-west-2 · us-east-1 · eu-central-1 · ap-southeast-1.Response (201)
embed_url is the zero-config path. Drop it directly into an <iframe src="..."> on your own product and you get the Theo-branded browser window (URL bar, live indicator, reconnect UI) with no SDK wiring. The token is short-lived — call GET /:id from your backend to mint a fresh one.Refresh the live view URL
BrowserBase’s debugger URL is pinned to a specific CDP page target. When the agent navigates, clicks something that opens a new tab, or the page destroys its target, the embedded WebSocket disconnects. Theo automatically force-refreshes after every agent tool call — but your own UI should also refresh on demand:live_view_version matters. When the iframe emits a browserbase-disconnected postMessage, refetch with ?force=1. The upstream provider can return the same URL string while silently swapping the underlying page target. Use live_view_version (not URL equality) to decide when to rekey the iframe.
Response
List active sessions
{ sessions: BrowserSessionSnapshot[] } — same per-session shape as GET /:id.
Inspect a session
embed_url (1 h TTL) so long-running dashboards can re-issue iframes without spinning up a new session.
End a session
Response
Errors
| Status | Code | Description |
|---|---|---|
| 400 | url_blocked | Starting URL failed the SSRF / allowlist guard |
| 401 | invalid_api_key | Missing or invalid API key |
| 404 | session_not_found | Unknown session id (or not owned by caller) |
| 404 | live_view_unavailable | Session ended or never produced a live URL |
| 429 | browser_session_limit | Per-user concurrency cap reached (default: 3) |
| 501 | browser_unconfigured | Deployment has no BrowserBase credentials configured |
