boxrouter api GROUP OPERATION. For a
full program, see the quickstart.
Sandboxes
pause and resume work only on a sandbox created with the pause_resume requirement, extend only with resources.extendable_lifetime, and previews.open only for a port the previews requirement named. On any other sandbox, the call fails with not_named.
get reads state and nothing else: a paused sandbox stays paused and its lifetime is not extended. Call resume to wake it.
Commands
Files
read returns and write accepts bytes in Python and Uint8Array in TypeScript. The CLI prints read results to stdout. For writes, it reads the content from the local file named by --body.
Names That Follow a Rule
The API reference lists the operation groups. Request fields keep the API’s
snake_case in both SDKs, for example timeout_seconds. Recover from Errors says when to set an idempotency key.
In TypeScript, await promise-returning methods and use for await for async generators; get returns the sandbox handle. In Python’s AsyncBoxRouter, await open_terminal() and use async for with terminal.output(); launch also supports async with.
Next Steps
Use the Python SDK
Install and configure the Python SDK.
Use the TypeScript SDK
Install and configure the TypeScript SDK.
Use the CLI
Install and use the CLI.