Each organization can run up to 10 sandboxes at once. To raise this limit, contact support.
https://api.baseten.co.
For operations inside a sandbox, such as running commands and working with
files, use the Sandbox runtime API.
For complete workflows, see Create and manage sandboxes,
Configure sandboxes,
Run commands and work with files,
Manage sandbox images,
Preview a sandbox application,
Sandbox volumes, and
Create a sandbox access token.
Authentication and teams
Authenticate sandbox, image, preview, and volume management requests with a short-lived sandbox access token as a bearer token, not your Baseten API key. Create the token with your API key through the access token operation. Select the team that owns the resource with theX-Team-Id header:
Team ID for the request. You can also select a team with the
team_id query
parameter. If you send both selectors, their values must match. When you omit
both, the API uses your only accessible team. If you can access
multiple teams, select one explicitly. The API rejects requests without access
to a team.url followed by /mcp, uses the same token.
Pagination
List operations return anitems array and a pagination object.
When pagination.has_more is true, pass pagination.cursor as the next
request’s cursor query parameter. Keep the same team, filters, and sort order
while paging. Stop when has_more is false.
Preview and preview-token lists currently return all results on one page. They
accept limit and cursor but don’t apply them yet. Continue checking
pagination.has_more so your client works when pagination is enabled.
Deployment and deletion
Creating a sandbox returns HTTP201 once the sandbox is ready, with status
DEPLOYED.
Deleting a sandbox returns HTTP 202 with status DELETING. Baseten deletes the
sandbox and its local data asynchronously. Stop sending work after requesting
deletion. For each status, see Deployment status.