Before you begin
Serverless sandboxes are generally available, and usage is billed. Access is enabled per organization. To request access for your organization, contact support. If your organization uses Forge Dedicated Cloud, follow Use sandboxes with Forge Dedicated Cloud.Run your first sandbox
Choose the credential for the account that owns and is billed for your sandbox. A Forge API key supports serverless placement. A CoreWeave API access token supports serverless and CoreWeave Kubernetes Service (CKS) placement. For account requirements, see Choose and get credentials. Follow the section for your credential, then verify the result.Forge API key
Get your Forge API key. If you don’t have an account, sign up through the same link. Then set the key in your terminal. The examples explicitly readFORGE_API_KEY; the SDK does not detect this variable automatically:
- Python
- TypeScript
With Run it with Python 3.11 and the sandbox client. The command installs them if needed:
uv installed, save this as hello.py:hello.py
x-wandb-api-key header, wandb_api_key strategy identifier, and TypeScript /wandb entry point are the current SDK identifiers for Forge authentication. Keep these identifiers as written.
CoreWeave API access token
Ask your administrator to create or update an Access Policy granting you the Sandbox User role. See Create an access policy for the steps. Create an API access token on the Tokens page, copy its Token Secret, and set it in your terminal:- Python
- TypeScript
With Run it with Python 3.11 and the sandbox client. The command installs them if needed:
uv installed, save this as hello.py:hello.py
Verify the result
The example prints the following output and stops the sandbox when it finishes:Output
resources to choose its CPU and memory.
For concurrent quotas, rate limits on create requests, and quota errors, see Limits and quotas.
Next steps
Continue with the guide for your workload:- Use your own compute: enable a runner on your cluster and run a sandbox there.
- Sandbox placement and spillover: compare serverless and CKS capacity and configure fallback.
- Run coding agents: connect a coding agent to a sandbox.
- GPU sandboxes: request GPU access and run a GPU workload.
- Python client: execute commands, work with files, and configure sandboxes.