Learn how to use the Serverless Inference API to access foundation models programmatically.Documentation 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.
Base URL
Access the Inference service at:ImportantTo use this endpoint, you need:
- A W&B account with Inference credits
- A valid W&B API key
<your-team>/<your-project>. Your default entity and the project name inference will be used if unspecified.Available methods
The Serverless Inference API provides OpenAI-compatible endpoints for interacting with foundation models:- Chat Completions - Create chat completions using various foundation models
- List Models - Get all available models and their IDs
Authentication
All API requests require authentication using your W&B API key. Create an API key at wandb.ai/settings. Include your API key in the request headers:- For OpenAI SDK: Set as
api_keyparameter - For direct API calls: Use
Authorization: Bearer <your-api-key>
Error handling
See API Errors for a complete list of error codes and how to resolve them.Next steps
- Try the usage examples to see the API in action
- Explore models in the UI
- Check usage limits for your account