Basics
Setup
Install and initialize the Sandbox SDK
Getting started with the Sandbox SDK is easy. Follow these steps to install the package, configure your credentials, and initialize a sandbox.
Prerequisites
- Python 3.10 or higher
- Pip package manager
- Valid
CLOUDCODE_API_KEY
1. Install via pip
Install the cloudcode
package, which includes both Local and Sandbox SDKs:
2. Set Up API Keys
The Sandbox SDK uses your CloudCode API key to authenticate and manage resources.
Recommended: Use CloudCode API Key
Set the environment variable in your shell:
Or in Python:
Alternative: Provider Keys (Legacy)
You can also pass OpenAI and Anthropic keys directly (not recommended):
3. Initialize the Sandbox SDK
Import and create an instance of SandboxSDK
:
You’re now ready to work in an isolated sandbox environment.
For usage examples, see: