requirements when you create the sandbox, and BoxRouter skips
every route that can’t provide it.
What Every Provider Does
A route passes these checks before BoxRouter uses it. You never request them.
Directory operations are not part of the baseline. List, create, and remove paths with commands
such as
ls -A and mkdir -p.
Inside a sandbox, nproc and free can report the host instead of your allocation, so size work
from the resources you asked for.
A running sandbox, process, or file never moves between providers, so changing the route affects
only sandboxes you create afterward.
Capabilities You Can Request
Request optional capabilities inrequirements when you create the sandbox. The sandbox records the
capabilities it received in contract.gates.
You cannot add capabilities after creation. A later call that needs a capability outside that
contract is refused with not_named.
This creates a sandbox that can pause, reads what it was granted, and destroys it:
previews.access; the call is refused until you
name a value or accept any value with "any".
Only capabilities in this table can be named in requirements. Naming another capability there returns
400 invalid_request with a fix.
To keep files between sandboxes, attach a Volume with the top-level volume field.
Sizes, region, lifetime, and isolation go in resources; the create reference
lists every field.
Choose Isolation
Every route keeps your code away from the host’s credentials. To require a particular boundary between your code and the host, setresources.kernel. Routes with any other kind are skipped.
kernel names the kind of boundary, not the technology behind it,
such as Firecracker, and not who else runs on the host.
Check Which Routes Fit
Support varies by provider, the environment offered on a route, and the account you connected. Both checks below are read-only and reserve no capacity.- List providers returns the routes your workspace can use now, each with the behavior it has been verified to provide.
- Match takes the exact request you plan to send and says which routes fit. For each route it rules out, it names the failed check and the nearest change that would qualify.
<PROVIDER_ID>:
gate_unsupported means the route does not provide the capability named in gate. Creating a sandbox
with the same request fails with 409 no_eligible_route. See
routing.
Large Files
Use Volumes to upload, download, and keep files outside a sandbox.Native Provider Features
BoxRouter SDKs expose the common operations and the capabilities above. For anything outside that, use the provider’s own SDK with its own credentials. Those calls sit outside BoxRouter routing and tracking, and the credentials don’t reach sandboxes BoxRouter manages. When a response includes provider details, distinguish application logic from diagnostics:- For logic that works on every route, use
state,exit_codeand the errorcode. - For diagnosis, use
native_state,native_error,provider,native_statusandnative_code.
route.provider identifies the provider.
Next Steps
How Routing Works
How BoxRouter filters and ranks routes.
Check Your Limits
Limits each route reports.
Create a Sandbox
Name the capabilities and size when you create one.