Mixedbread

Authentication

Learn how to securely authenticate with the Mixedbread API. This guide covers creating and using API keys, implementing authentication in API requests and SDKs, and best practices for API key management to ensure the security of your integration.

Creating an API Key

  1. Go to the
  2. Create a new API key
  3. Keep your key secret!

Using Your API Key

Include your API key in the Authorization header of your requests:

curl https://api.mixedbread.ai/v1/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"input": "Your text here", "model": "mixedbread-ai/mxbai-embed-large-v1"}'

SDK Authentication

If you're using our SDKs, simply pass your API key to the constructor:

from mixedbread_ai import MixedbreadAIClient
 
client = MixedbreadAIClient(api_key="YOUR_API_KEY")

Best Practices

  • Never expose your API key in client-side code or public repositories
  • Use environment variables to store your API key
  • Rotate your API key regularly
  • If you suspect your key is compromised, reset it immediately in the dashboard

Happy Baking! 🍞

On this page