Python SDK
Learn how to install and configure Mixedbread's Python SDK for interacting with our API services.
Installation
Quick Start
Here's a quick example of client initialization:
Configuration
The Mixedbread
constructor accepts the following parameters:
api_key
: Your Mixedbread API key (required)max_retries
: Maximum number of retries for failed requests (default: 3)timeout
: Request timeout in seconds (default: 30.0)base_url
: Custom base URL for API requests (default: https://api.mixedbread.com)
Async Support
For async applications, use the async client:
Error Handling
Use try/except blocks to handle errors:
Available Services
The SDK provides access to the following services:
mxbai.vector_stores
- Create and manage vector storesmxbai.vector_stores.files
- Create and manage vector stores filesmxbai.files
- Upload and manage filesmxbai.parsing
- Manage parsing jobsmxbai.embed
- Generate embeddingsmxbai.rerank
- Rerank search results
Documentation and Examples
For detailed usage examples and API documentation, check out:
Next Steps
- Get your API key in the Mixedbread dashboard
- Join our community for support and to share your projects
Happy baking! 🍞🚀
Last updated on