Related
- CLI Sandbox Commands - Manage sandboxes from CLI
What You’ll Learn
- How to create sandboxes from templates
- How to list and filter existing sandboxes
- How to connect to sandboxes and manage their state
- How to configure timeouts and lifecycle management
- SDK and API methods for sandbox operations
Sandbox Lifecycle Overview
| Operation | SDK Method | API Endpoint |
|---|---|---|
| Creating | Sandbox.create() | POST /v1/sandboxes |
| Listing | Sandbox.list() / Sandbox.iter() | GET /v1/sandboxes |
| Connecting | Sandbox.connect() | GET /v1/sandboxes/:id |
| Managing State | start() / stop() / pause() / resume() | POST /v1/sandboxes/:id/:action |
| Timeout | set_timeout() | PUT /v1/sandboxes/:id/timeout |
Core Concepts
Creating Sandboxes
Learn how to create new sandboxes from templates with custom configuration.- Creating Sandboxes - Create new sandboxes from templates
- SDK: Python: Sandbox.create() | JavaScript: Sandbox.create()
- API: POST /v1/sandboxes
Listing Sandboxes
Discover how to list, filter, and iterate through existing sandboxes.- Listing Sandboxes - List and filter sandboxes
- SDK: Python: Sandbox.list() | Python: Sandbox.iter() | JavaScript: Sandbox.list()
- API: GET /v1/sandboxes
Connecting to Sandboxes
Connect to existing sandboxes by ID or from previous sessions.- Connecting to Sandboxes - Connect to existing sandboxes
- SDK: Python: Sandbox.connect() | JavaScript: Sandbox.connect()
- API: GET /v1/sandboxes/:id
Managing Sandbox State
Control sandbox lifecycle: start, stop, pause, and resume operations.- Managing Sandbox State - Control sandbox lifecycle
- SDK: Python: start/stop/pause/resume | JavaScript: start/stop/pause/resume
- API: POST /v1/sandboxes/:id/start | POST /v1/sandboxes/:id/stop | POST /v1/sandboxes/:id/pause | POST /v1/sandboxes/:id/resume
Timeout Management
Configure and manage sandbox auto-shutdown timers.- Timeout Management - Set and extend sandbox timeouts
- SDK: Python: set_timeout() | JavaScript: setTimeout()
- API: PUT /v1/sandboxes/:id/timeout
SDK Reference
Python SDK
Complete reference for Python sandbox operations.- Sandbox Class - Complete Python SDK reference
- AsyncSandbox Class - Async/await support
JavaScript SDK
Complete reference for JavaScript/TypeScript sandbox operations.- Sandbox Class - Complete JavaScript SDK reference
API Reference
Control Plane API
REST API endpoints for sandbox lifecycle management.- Control Plane API Overview - API overview
- Create Sandbox -
POST /v1/sandboxes - Get Sandbox -
GET /v1/sandboxes/:id - List Sandboxes -
GET /v1/sandboxes - Delete Sandbox -
DELETE /v1/sandboxes/:id - Pause Sandbox -
POST /v1/sandboxes/:id/pause - Resume Sandbox -
POST /v1/sandboxes/:id/resume - Set Timeout -
PUT /v1/sandboxes/:id/timeout
Quick Start
If you’re new to sandboxes, start here:- Quickstart Guide - Get started in 5 minutes
- Creating Sandboxes - Create your first sandbox
- Listing Sandboxes - Find existing sandboxes
- Managing State - Control sandbox lifecycle
Related Topics
- Templates - Learn about sandbox templates
- Code Execution - Execute code in sandboxes
- File Operations - Work with files in sandboxes
- Environment Variables - Manage environment variables
Next Steps
- Explore Code Execution to run code in sandboxes
- Learn about File Operations for working with files
- Understand Template Management for custom environments
- Review Observability for monitoring sandboxes

