Live view streams a sandbox to a browser: its terminal, or its desktop. Your backend mints a short-lived viewer token with your API key, and your page shows the returned embed URL in an iframe. Many people can watch the same sandbox; the sandbox serves one stream per view, whatever the number of viewers. Scopes: view watches; control also sends keystrokes, mouse and resize. Tokens last 30 to 600 seconds (default 600).

Mint a token

The embed URL looks like https://stream.compute.anonalabs.com/embed/v1/<id>?mode=terminal#t=<token>. The token is in the URL fragment, which browsers never send to a server, so it does not end up in logs.

Embed it

Mint the token on your server (never ship your API key to a browser) and put the URL in an iframe:

Keep a long session alive

A token expires after at most 10 minutes. The embed asks its host page for a new one shortly before that, with postMessage. Answer it with a fresh token from your backend:
The viewer reconnects on its own after network drops. It stops for good when the token is revoked, the sandbox is gone, or the token does not allow the channel.

Thumbnails

For lists and dashboards, fetch the latest thumbnail directly. It is a WebP while the sandbox has a screen or a Chrome page to show, and 204 No Content otherwise:
thumbnail.sh
The sandbox grabs frames only while someone asks for them, and every viewer shares the same frames. Send If-None-Match with the last ETag to get 304 when nothing changed.

Who may mint

A key limited to certain sandboxes can mint only for those. A sandbox of another organization answers 404. The dashboard’s sandbox page has the same live view built in.