Skip to main content
Sandboxes is in Private Preview. Contact Baseten to request access.
Use the runtime API to work with files, run processes, and inspect network connections inside a sandbox. Send requests to the url returned when you create or get a sandbox. To create, configure, or delete the sandbox itself, use the Management API.

Authentication

Send a sandbox access token in the Authorization header:
In the API playground, set sandbox_host to the hostname from your sandbox’s url, without https:// or the trailing slash. Enter the sandbox access token in the bearer token field.

OpenAPI specification

Download the OpenAPI specification to inspect the API contract or use it with an API client. The reference pages use this specification to display request fields and responses. The hosted specification is a snapshot of the default sandbox image’s runtime API. A custom image can use a different sandbox API image. Set SANDBOX_URL to your sandbox’s returned url and SANDBOX_TOKEN to your sandbox access token. To retrieve the specification served by your sandbox, run the following command:
The sandbox serves its specification in Swagger 2.0 format. The hosted specification uses OpenAPI 3.0 for the documentation and API playground.

Endpoints