Skip to main content
Screenshots come back as base64 PNG, ready to feed to a vision model. Use it when there is no API to call and the interface is the only path — filling forms, operating desktop software, driving GUI-only tools. The high-level ComputerBox API is Python and Node; other SDKs drive the desktop through low-level exec.

Quick Example

The minimal flow: start the desktop, wait until ready, then take a screenshot and save it locally. The code is ready to copy and run.

Python

Node

Parameters & Returns

Constructor parameters

Python ComputerBox(...) (keyword arguments): Node new ComputerBox(options?) (ComputerBoxOptions):
The image is fixed to lscr.io/linuxserver/webtop:ubuntu-xfce, and the display resolution is fixed to 1024x768 (DISPLAY=:1). These are set by environment variables injected by the SDK and are not changed via constructor parameters.

GUI automation methods (Python / Node equivalents)

screenshot() return fields

Watching the desktop live in a browser

The desktop ports are mapped to the host (default HTTP 3000 / HTTPS 3001). After the box starts, open https://localhost:3001 (or http://localhost:3000) in a browser to see the live desktop.
HTTPS uses a self-signed certificate, so the browser will show a security warning: click “Advanced” then “Proceed” to continue.

Full automation example (screenshot, click, type)

Troubleshooting

Feeding screenshots to a vision model (computer-use loop)

The base64 PNG returned by screenshot() can be passed directly as image input to a model that supports computer-use. The actions the model emits (click coordinates, text to type, keys to press) are then mapped back to the mouse_move / left_click / type / key methods above, forming a “look at the screen, decide, act, look again” loop. The coordinate origin is the top-left corner, and the range matches the value returned by get_screen_size().