Prerequisites ↗
noOriginal Documentation
Documentation Index#
Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt Use this file to discover all available pages before exploring further.
Set up your environment to use W&B Inference
Complete these steps before using the W&B Inference service through the API or UI.
Before starting, review the usage information and limits to understand costs and restrictions.
Set up your W&B account and project#
You need these items to access W&B Inference:
A W&B account
Sign up at W&BA W&B API key
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:
- Log in to W&B, click your user profile icon, then click User Settings.
- Click Create new API key.
- Provide a descriptive name for your API key.
- Click Create.
- Copy the displayed API key immediately and store it securely.
To create an API key owned by a service account:
- Navigate to the Service Accounts tab in your team or organization settings.
- Find the service account in the list.
- Click the action menu (
...), then click Create API key. - Provide a name for the API key, then click Create.
- Copy the displayed API key immediately and store it securely.
- Click Done.
You can create multiple API keys for a single service account to support different environments or workflows.
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.
- A W&B project
Create a project in your W&B account to track usage
Set up your environment (Python)#
To use the Inference API with Python, you also need to:
Complete the general requirements above
Install the required libraries:
pip install openai weave
Note
The weave library is optional but recommended. It lets you trace your LLM applications. Learn more in the Weave Quickstart.
See usage examples for code samples using W&B Inference with Weave.
Next steps#
After completing the prerequisites:
- Check the API reference to learn about available endpoints
- Try the usage examples to see the service in action
- Use the UI guide to access models through the web interface