Mixedbread

Authentication

Creating an API Key

  1. Log in to your .
  2. Navigate to API Keys β†’ Create.
  3. Give your key a descriptive name.
  4. Copy your key immediatelyβ€”it won't be displayed again.

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")

Security Best Practices

Protecting Your API Key

  • Never expose your API key in client-side code, public repositories, or logs
  • Use environment variables or secure secret management systems
  • Implement proper access controls in your application infrastructure
  • Monitor API usage for unusual patterns that might indicate compromised keys

Key Management

  • Rotate keys regularly as part of your security hygiene
  • Use different keys for development, staging, and production environments
  • Revoke unused keys immediately when team members leave or projects end
  • Reset compromised keys immediately if you suspect unauthorized access

Development Tips

# Use environment variables
export MIXEDBREAD_API_KEY="your_api_key_here"
 
# Never commit keys to version control
echo "MIXEDBREAD_API_KEY=*" >> .gitignore

For production deployments, use your platform's secret management system (AWS Secrets Manager, Azure Key Vault, Google Secret Manager, etc.).

Last updated: June 10, 2025