Skip to main content
Run a command in a sandbox on serverless capacity and print its output. No cluster setup is required.

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 W&B Dedicated Cloud, follow Use sandboxes with W&B 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. Choose a credential tab, then verify the result.
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. These examples explicitly select W&B authentication:
With uv installed, save this as hello.py:
hello.py
Run it with Python 3.11 and the sandbox client. The command installs them if needed:
The Forge API key uses the SDK’s existing W&B identifiers: WANDB_API_KEY, AuthStrategy.WANDB, and the TypeScript /wandb entry point.

Verify the result

The example prints the following output and stops the sandbox when it finishes:
Output
The sandbox has 1 CPU and 1 GiB of memory. Serverless sets resource limits equal to requests. Change 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:
Last modified on October 23, 2026