Skip to main content
If your organization uses W&B Dedicated Cloud, authenticate serverless sandboxes with an API key from your dedicated instance instead of wandb.ai. The Python client sends your key and instance hostname to the CoreWeave sandbox service, which validates the key against your instance. Point the client at your instance’s URL to select the correct instance for authentication.
CoreWeave Serverless sandboxes are in public preview.

Before you begin

You need the following:
  • Sandbox access enabled for your W&B Dedicated Cloud instance. Contact your W&B account team to confirm that your instance has the required server updates and to request access.
  • The URL of your W&B Dedicated Cloud instance, for example https://[INSTANCE].wandb.io. The hostname must end in .wandb.io. Instances on custom domains aren’t supported.
  • Python 3.11 or newer.
W&B Self-Managed deployments, including air-gapped installations, aren’t supported. The TypeScript client doesn’t support Dedicated Cloud instances yet, so use the Python client.

Get an API key from your instance

Create a personal API key on your dedicated instance, not on wandb.ai/authorize:
  1. Sign in to your W&B Dedicated Cloud instance.
  2. Click your user profile icon, then click User Settings.
  3. Scroll to the API Keys section and create a key.
W&B shows the full key only once, when you create it. For more information, see How do I find my API key? in the W&B documentation. The key must be a personal (user) API key. Other W&B credential types are rejected.

Point the client at your instance

Install the Python client with the wandb extra:
Set your instance URL and API key. Replace [INSTANCE] with your instance’s hostname prefix and [WANDB-API-KEY] with the key you created:
The client resolves credentials through the wandb library, which reads WANDB_BASE_URL to determine which W&B instance issued your key.

Run a sandbox

Pass auth=AuthStrategy.WANDB to select W&B authentication. Without it, the client looks for a CoreWeave API access token in CWSANDBOX_API_KEY.
If the command succeeds, Hello! appears in the output. If authentication fails, confirm that WANDB_BASE_URL matches the instance where you created the key. A key from a dedicated instance doesn’t authenticate against wandb.ai, and a wandb.ai key doesn’t authenticate against a dedicated instance.

Next steps

Last modified on September 25, 2026