W&B introduced a new API key format that is approximately 92 characters long (format:Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-kb-refresh.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
wandb_v1_<key_id>_<secret>). Older versions of the wandb SDK validate that keys are exactly 40 characters and reject the new format with this error:
wandb package, which accepts both the legacy 40-character format and the new 92-character format:
- Check whether your account still has an older-format key active. If so, keep using it — legacy 40-character keys continue to work and are not automatically revoked when the new format is issued.
- If you have already deleted your legacy key and cannot upgrade the SDK, contact W&B support. In some cases a legacy-format key can be issued for dedicated or on-premises instances.
- As a temporary workaround, you can pass the key via the
WANDB_API_KEYenvironment variable rather than usingwandb login, which may bypass the local validation in older SDK versions:
API key must have 40+ characters, has 20 — can appear when calling wandb.Api().viewer.generate_api_key() programmatically in certain SDK versions. This is a different issue from the key format migration. Upgrade the SDK to resolve it; if the error persists after upgrading, contact support.
API Keys Authentication SDK