runtime_sandboxes_previews
HTTPS addresses for ports inside a sandbox, https://-./. create(id, port, visibility?, ttlSeconds?, expiresAt?, embedOrigins?): private (default) needs the token as the x-runtime-preview-token header, or urlWithToken; public (an account with a kept top-up only) needs none and shows browsers a one-time warning. WebSockets work. embedOrigins limits which sites may show it in an iframe. Idempotent per port. list(id): Each shared port, with a fresh token if private. rotate(id, port): A new token; the old ones stop working, as when a link leaked. delete(id, port): Stop sharing the port. session_create(id, sessionSeconds?, origins?): A web page's token for this sandbox's commands, files and previews; shown once. session_list(id): Without tokens. session_revoke(id, sessionId): Ends it now.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| port | No | The port inside the sandbox. | |
| action | Yes | ||
| origins | No | ||
| expiresAt | No | An absolute private-token deadline, at least a minute and at most a week ahead. The token never outlives it. | |
| sessionId | No | ||
| ttlSeconds | No | The token's lifetime in seconds. | |
| visibility | No | private (default): a token is needed. public: anyone with the address; only for an account with a kept top-up. | |
| embedOrigins | No | The sites that may show this preview in an iframe, as origins: https://app.example.com, https://*.example.com for its subdomains, or http://localhost:3000. Up to 16. Any other site's iframe is refused, and a private link's token works in an iframe only on these. Omitted on a preview that exists: kept as it is. [] or null: any site (the default). | |
| sessionSeconds | No |