SandboxesBrowser Sandbox
Browser Sandbox Endpoints
Browser Sandbox
Create and manage remote Browser Sandbox sessions. Connect with Playwright or Puppeteer via WebSocket for full browser automation, or view the browser live via VNC.
Remote Browser Control
Each session launches an isolated browser instance. Connect via WebSocket to automate with Playwright/Puppeteer, or use the live view URL to watch the browser in real time.
POST
/v1/browser-sandbox/sessionCreate a new Browser Sandbox session for remote control. Returns a WebSocket URL to connect with Playwright/Puppeteer.
Request Body
| Parameter | Type | Description |
|---|---|---|
width | number | Browser viewport width (800-3840). Defaults to 1280 |
height | number | Browser viewport height (600-2160). Defaults to 720 |
headless | boolean | Run browser in headless mode. Defaults to true |
browser | "camoufox" | "lightpanda" | Browser engine. camoufox: full Firefox with VNC support. lightpanda: lightweight CDP headless. Defaults to camoufox |
proxy | boolean | Use proxy for the browser. Defaults to true |
Example Request
Example Response
Response Fields
| Field | Type | Description |
|---|---|---|
sessionId | string | Unique session identifier |
wsUrl | string | WebSocket URL for connecting with Playwright/Puppeteer |
liveViewUrl | string | null | Live view URL for watching the browser in real time (null if headless or lightpanda) |
browser | string | Browser engine used (camoufox or lightpanda) |
createdAt | string | ISO timestamp when session was created |
width | number | Browser viewport width |
height | number | Browser viewport height |
costPerMin | number | Cost per minute in USD. Headless: $0.002/min. Visible: $0.01/min |
GET
/v1/browser-sandbox/session/:idGet details about a Browser Sandbox session including its status, cost, and timestamps.
Example Request
Example Response
Response Fields
| Field | Type | Description |
|---|---|---|
sessionId | string | Unique session identifier |
status | string | Session status (active, closed) |
width | number | Browser viewport width |
height | number | Browser viewport height |
headless | boolean | Whether the session is headless |
proxy | boolean | Whether the session uses a proxy |
browser | string | Browser engine used (camoufox or lightpanda) |
wsUrl | string | WebSocket URL |
liveViewUrl | string | null | Live view URL (null if headless) |
totalCost | number | Total accumulated cost in USD |
hasStorageState | boolean | Whether the session has saved browser state for resuming |
lastUrl | string | null | Last URL visited in the session |
closeReason | string | null | Reason the session was closed (manual, timeout, error) |
closedAt | string | null | ISO timestamp when the session was closed |
createdAt | string | ISO timestamp when session was created |
lastActivityAt | string | ISO timestamp of last activity |
DELETE
/v1/browser-sandbox/session/:idClose a Browser Sandbox session. The browser state (cookies, localStorage) is automatically saved for later resumption.
Example Request
Example Response
POST
/v1/browser-sandbox/session/:id/resumeResume a previously closed Browser Sandbox session. A new browser instance is launched with the saved state (cookies, localStorage) restored.
Example Request
Example Response
The response format is identical to the create endpoint. The session ID remains the same, and you get a fresh WebSocket URL to connect to.
GET
/v1/browser-sandbox/sessionsList all active browser sessions on this pod. No authentication required.
Example Response
WebSocket Endpoints
Browser Control
Path:
/browser-sandbox-ws?sessionId={sessionId}Transparent bidirectional WebSocket proxy between your client and the browser. Connect with Playwright:
VNC Live View
Path:
/vnc-ws?sessionId={sessionId}VNC proxy for live browser viewing. Use with
react-vnc or any VNC WebSocket client. The VNC pipeline starts on-demand when the first client connects and stops when the last client disconnects. Only available for non-headless Camoufox sessions.Using the SDK
The Node.js SDK provides a simple interface for Browser Sandbox session management:
Playwright Example — SDK Only
The Node.js SDK makes it easy to create a session and connect via Playwright:
Pricing
Browser Sandbox sessions are billed per minute. Visible sessions (headless: false) cost
$$0.01 USD/min (~$$0.60/hour). Headless sessions cost $$0.002 USD/min (~$$0.12/hour). Billing starts when the session is created and stops when it is closed or times out.