Mixedbread

Authentication

Authenticate securely with Mixedbread API using API keys. This guide covers key creation, implementation in requests and SDKs, and key management best practices.

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 to access the API:

curl https://api.mixedbread.com/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 import Mixedbread
 
client = Mixedbread(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! 🍞

Last updated on

On this page