Skip to main content
The SDK ships two clients with identical methods: SandboxClient for synchronous scripts and AsyncSandboxClient for concurrent workloads. Both are importable from prime_sandboxes. Every feature page shows the sync client; the async client takes the same calls with await.

Sync client

Async client

Launch a fleet

bulk_wait_for_creation polls via the list endpoint, backing off automatically if the API throttles you. idempotency_key makes create retries safe. Tear down with bulk_delete. For a full script, see prime/examples/sandbox_async_demo.py.

Error handling

All exceptions are importable directly from prime_sandboxes.

Sandbox lifecycle errors

Raised when a sandbox is no longer RUNNING. SandboxOOMError, SandboxTimeoutError, and SandboxImagePullError are subclasses of SandboxNotRunningError, so catch the base class for broad handling.

Operation errors

Raised when the sandbox is still running but the operation itself fails.

API errors