Usage
Description
Authenticate your machine with W&B. Store an API key locally for authenticating with W&B services. By default, credentials are stored without server-side verification. If no API key is provided as an argument, the command looks for credentials in the following order:- The WANDB_API_KEY environment variable
-
The api_key setting in a system or workspace settings file (use
wandb statusto see which settings file is used) - The .netrc file (~/.netrc, ~/_netrc, or the NETRC env var path)
- An interactive prompt (if a TTY is available)
--host, or set the WANDB_BASE_URL environment variable.
For example, to log in interactively (prompts for API key):
Arguments
| Name | Default | Type |
|---|---|---|
key | STR | False |
Options
| Flag | Type | Description |
|---|---|---|
--cloud | BOOL Flag | Log in to the W&B public cloud (https://api.wandb.ai). Mutually exclusive with —host. Default: False |
--host, --base-url | STR | Log in to a specific W&B server instance by URL (e.g. https://my-wandb.example.com). Mutually exclusive with —cloud. Default: None |
--relogin | BOOL Flag | Force a new login prompt, ignoring any existing credentials. Default: None |
--verify | BOOL Flag | Verify the API key with W&B after storing it. If verification is successful, display the source of the credentials and the default team. Default: False |