Skip to main content

새로운 API 키 생성

To create an API key, select the Personal API key or Service Account API key tab for details.
To create a personal API key owned by your user ID:
  1. Log in to W&B, click your user profile icon, then click User Settings.
  2. Click Create new API key.
  3. Provide a descriptive name for your API key.
  4. Click Create.
  5. Copy the displayed API key immediately and store it securely.
The full API key is only shown once at creation time. After you close the dialog, you cannot view the full API key again. Only the key ID (first part of the key) is visible in your settings. If you lose the full API key, you must create a new API key.
For secure storage options, see Store API keys securely.

API 키 찾기

In Dedicated Cloud and Self-Managed:
  • Organization admins can find or list API keys for all organization users and service accounts.
  • Team admins can find or list API keys for service accounts in teams they administer.
  • Non-admin users can find or list their own API keys.
To find an API key, select the Personal API key or Service Account API key tab for details.
To find a personal API key owned by your user ID:
  1. Log in to W&B, click your user profile icon, then click User Settings.
  2. Scroll to the API Keys section.
The API keys table shows the key ID (the first part of each API key) for identification purposes. The full secret API key is only displayed once when you create it. If you need to use an existing key but do not have the full secret stored, you must create a new API key.

API 키 삭제

API 키를 삭제하면 해당 키를 사용하는 모든 스크립트나 서비스의 엑세스 권한이 즉시 취소됩니다. 기존 키를 삭제하기 전에 모든 시스템에서 새 키를 사용하도록 업데이트했는지 확인하세요.
엑세스 권한을 취소하려면 API 키를 삭제하세요. 자세한 내용은 Personal API key 또는 Service Account API key 탭을 선택하여 확인하십시오.
  1. wandb.ai/settings로 이동합니다.
  2. API Keys 섹션에서 삭제하려는 키 옆의 삭제 버튼을 클릭합니다.

API 키 교체

API 키를 교체(로테이션)하려면 다음 단계를 따르세요.
  1. 새로운 API 키를 생성합니다.
  2. 모든 스크립트, 서비스 및 환경에서 새 API 키를 사용하도록 업데이트합니다.
  3. 모든 위치에서 새 API 키가 제대로 작동하는지 테스트합니다.
  4. 이전 API 키를 삭제합니다.

Store and handle API keys securely

API keys provide access to your W&B account and should be protected like passwords. Follow these best practices:

What to avoid

  • Never commit API keys to version control systems such as Git.
  • Do not store API keys in plain text configuration files.
  • Do not pass API keys on the command line, because they will be visible in the output of OS commands like ps.
  • Avoid sharing API keys through email, chat, or other unencrypted channels.
  • Do not hard-code API keys in your source code.
If an API key is exposed, delete the API key from your W&B account immediately and contact support or your AISE.

Environment variables

When using API keys in your code, pass them through environment variables:
export WANDB_API_KEY="your-api-key-here"
This approach keeps keys out of your source code and makes it easier to rotate them when needed.
Avoid setting the environment variable in line with the command, because it will be visible in the output of OS commands like ps:
# Avoid this pattern, which can expose the API key in process managers
export WANDB_API_KEY="your-api-key-here" ./my-script.sh

SDK version compatibility

New API keys are longer than legacy keys. When authenticating with older versions of the wandb or weave SDKs, you may encounter an API key length error. Solution: Update to a newer SDK version:
  • wandb SDK v0.22.3+
    pip install --upgrade wandb==0.22.3
    
  • weave SDK v0.52.17+
    pip install --upgrade weave==0.52.17
    
If you cannot upgrade the SDK immediately, set the API key using the WANDB_API_KEY environment variable as a workaround.