Skip to main content
A sandbox can run Chrome, which you drive from outside over the Chrome DevTools Protocol (CDP), and a Linux desktop, which you control with screenshots and input actions. Each is a switch on the sandbox. The browser is on every plan; the desktop needs Pro, Team or Enterprise. See Browser and desktop.

Switch them on

Pass browser or desktop to Sandbox.create or sbx.fork, or switch a running sandbox:
Left out, create uses the workspace default and fork copies the parent. enable() and disable() resolve with the updated sandbox. enabled reads the record as of the last call; call sbx.refresh() to re-read it. If the host cannot switch on a feature you asked for at create or fork, the call still succeeds and sbx.featureError holds the reason. On a create that feature stays off; on a fork it keeps the parent’s value. Retry with enable(). The next call that re-reads the record clears featureError.
Switching the browser off keeps its profile, cookies included, for the next time it is on.

Browser

The URL looks like wss://eu-1.nodes.zode.dev/cdp/.... transport is direct when it points at the sandbox’s host and relay when it goes through api.zode.dev. The ticket in the URL is good for opening a connection for 5 minutes (expires_at); a connection you opened stays open after that. Ask for a new URL only to reconnect. While Chrome is off, both calls throw browser_off (409).

Playwright

Puppeteer

Code running inside the sandbox reaches the same Chrome at http://127.0.0.1:9222.

Desktop

Coordinates are screen pixels from the top left. While the desktop is off, these calls throw desktop_off (409).

Live view

viewUrl() returns a page URL to put in an iframe. Its ticket opens the page for 1 hour; an open page keeps its connection. By default the view is watch-only. viewUrl({ control: true }) lets the viewer’s mouse, keyboard, clipboard and file transfers reach the desktop. To switch modes, ask for a new URL.
Leave out the iframe’s sandbox attribute; the page needs scripts and storage. A page with a Content-Security-Policy needs frame-src https://*.nodes.zode.dev https://api.zode.dev.