The W&B Public API provides programmatic access to query, export, and update data stored in W&B. Use this API for post-hoc analysis, data export, and programmatic management of runs, artifacts, and sweeps. While the main SDK handles real-time logging during training, the Public API enables you to retrieve historical data, update metadata, manage artifacts, and perform analysis on completed experiments. The mainDocumentation Index
Fetch the complete documentation index at: https://wb-21fd5541-john-wbdocs-2044-rename-serverless-products.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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: