Skip to main content
Every port of a sandbox has a URL: https://<port>-<sandbox id>.sbx.compute.anonalabs.com. The SDK builds it for you with get_host. Who can open it depends on how you share it: Ports 49983 (envd, which runs commands and files) and 49800 (the in-sandbox agent for terminals, desktop and live view) are never shared: they always need the sandbox’s own access token, which the SDK holds. Asking to share either is refused with 400.
The link looks like https://3000-<id>.sbx.compute.anonalabs.com/?anona_sig=…&anona_exp=…. On the first visit the gateway exchanges it for a cookie that is scoped to that one port’s host (Secure, HttpOnly, SameSite=Lax) and redirects to the same URL without the signature, so the app inside never sees it. Other ports and other sandboxes stay private.
The cookie is named anona_sbx, and it is the only grant left after the redirect: the signed query parameters are gone from the second request. A curl call, or an httpx or fetch call, that does not keep cookies across the redirect gets a 401 on the second request. Either open the link in a browser, or use a client that persists cookies: curl -L -c jar.txt -b jar.txt "$LINK", requests.Session(), or httpx.Client(follow_redirects=True) (its cookie jar is on by default), as in the sample above.
Revoking ends every link and every live-view token of the sandbox within a second. The dashboard’s sandbox page has Share preview, and agents get links from the MCP tool get_preview_url.

Public ports

public_port.sh
Up to 64 public ports per sandbox. PUT /v1/sandboxes/{id}/ports/{port} with {"public": true} does the same over the API.

Traffic token

For your own services, keep the port private and send the sandbox’s traffic token:
private_port.py
A request to a paused sandbox’s URL gets 409; resume it with Sandbox.connect first.