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 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 read FORGE_API_KEY; the SDK does not detect this variable automatically:
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 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:
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:

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 14, 2026