Skip to main content
This article covers credential discovery with the Python SDK’s built-in authentication strategies. Which credential the SDK looks for depends on the strategy you select. The SDK doesn’t fall back from one strategy to the other. The Python quickstart uses AuthStrategy.WANDB. The Dedicated Cloud guide passes credentials explicitly through AuthHeaders; for that example, check the variables and headers configured in the guide because the wandb credential-discovery settings below don’t apply.
  • CoreWeave (default): reads CWSANDBOX_API_KEY, a CoreWeave API access token, and sends it as a bearer token. Requests go out unauthenticated when the variable isn’t set.
  • Forge API key: selected explicitly by passing auth=AuthStrategy.WANDB. Credential discovery is delegated to the wandb library, which accepts an active wandb login session, WANDB_API_KEY, or the api.wandb.ai entry in ~/.netrc.
Check which credential you have configured, without printing its value:

Common issues

With AuthStrategy.WANDB in cwsandbox 1.18.0 and later, the entity of an active wandb.run takes precedence over WANDB_ENTITY and settings files. If a run is active, configure it to use the intended team. When neither the run nor the settings select an entity, the API uses your default entity. If no project is configured, the API uses sandbox. Authentication & Access
Last modified on October 29, 2026