Api class serves as the entry point to most functionality.
Training and fine-tuning models is done elsewhere in the W&B Python SDK. Use the Public API for querying and managing data after it has been logged to W&B.
Available Components
| Component | Description | 
|---|---|
| Api | Main entry point for the Public API. Query runs, projects, and artifacts across your organization. | 
| Runs | Access and manage individual training runs, including history, logs, and metrics. | 
| Artifacts | Query and download model artifacts, datasets, and other versioned files. | 
| Sweeps | Access hyperparameter sweep data and analyze optimization results. | 
| Projects | Manage projects and access project-level metadata and settings. | 
| Reports | Programmatically access and manage W&B Reports. | 
| Team | Query team information and manage team-level resources. | 
| User | Access user profiles and user-specific data. | 
| Files | Download and manage files associated with runs. | 
| History | Access detailed time-series metrics logged during training (see Run.history). | 
| Automations | Manage automated workflows and actions. | 
| Integrations | Configure and manage third-party integrations. | 
Common Use Cases
Data Export and Analysis
- Export run history as DataFrames for analysis in Jupyter notebooks
- Download metrics for custom visualization or reporting
- Aggregate results across multiple experiments
Post-Hoc Updates
- Update run metadata after completion
- Add tags or notes to completed experiments
- Modify run configurations or summaries
Artifact Management
- Query artifacts by version or alias
- Download model checkpoints programmatically
- Track artifact lineage and dependencies
Sweep Analysis
- Access sweep results and best performing runs
- Export hyperparameter search results
- Analyze parameter importance
Authentication
The Public API uses the same authentication mechanism as the Python SDK. You can authenticate in several ways: Use theWANDB_API_KEY environment variable to set your API key:
Api class:
wandb.login() to authenticate the current session: