Skip to main content
Create a sandbox, run a command, and clean it up.
Sandbox access must be enabled for your organization. Contact us if you receive sandbox_access_denied.

1. Install and authenticate the Python SDK

You need Python 3.10 or newer. Create an API token in the Thunder console, then install the SDK and export the token in your shell:

2. Run some code

Create a file named get_started.py with the following code:
get_started.py
Run the script with Python:
cpu is measured in vCPUs; memory and storage are measured in GiB. This example requests one H100 GPU and expires after 900 seconds (15 minutes). Terminating it destroys its filesystem, so always download anything you need to keep. On the first SSH operation, the SDK creates one local Ed25519 key and requests a short-lived organization certificate. The same credential works with every sandbox in your organization and is renewed automatically. Next, see the Python SDK reference for GPUs, images, files, networking, SSH, and existing sandboxes. To call the API directly, see the Sandboxes API reference.
Thunder sandboxes are isolated Ubuntu microVMs powered by Firecracker, not gVisor containers. The VM boundary provides stronger isolation and broader Linux compatibility, so you can run workloads that container sandboxes cannot, including Dockerized workloads.