Skip to main content
Sandboxes is in Private Preview. Contact Baseten to request access.
Create, inspect, update, and delete sandbox instances and images over HTTP at the base URL https://api.baseten.co. For a complete resource workflow, follow Manage sandboxes.

Authentication and teams

Authenticate sandbox and image 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 the X-Team-Id header:
string
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.
Sandbox management requests use the API base URL. A sandbox’s MCP server, at its returned url followed by /mcp, uses the same token.

Pagination

List operations return an items array and a pagination object.
integer
default:"20"
Maximum number of items to return, from 1 to 100.
string
Opaque cursor from the previous page. Omit it for the first request.
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.

Deployment and deletion

Creating a sandbox returns HTTP 201 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. See the lifecycle guide for deployment statuses and expiration.

Endpoints