This minimal template demonstrates how to build semantic image search with natural language queries using the Mixedbread Search API.
- Bun (or Node.js 22+)
- Git
git clone <your-repo-url>
cd mxbai-image-searchbun installCreate a .env file in the root directory:
cp .env.example .envAdd your Mixedbread credentials to the .env file:
MXBAI_API_KEY=your-api-key-here
MXBAI_STORE_ID=your-store-idTo get your API key and Store ID, you have two options:
-
From Vercel Integration (Recommended if deploying to Vercel):
- Go to your Vercel Dashboard
- Navigate to your project's Integrations tab
- Install or access the Mixedbread integration
- Copy your API key and Store ID from the integration settings
-
From Mixedbread Platform (For standalone use):
- Visit the Mixedbread Platform
- Sign up or log in to your account
- Navigate to API Keys and create a new key
- Navigate to Stores and create a new Store, then copy the Store ID
The project includes a script to upload images to your Mixedbread Store:
bun scripts/upload-images.ts ./public/imagesThis will process all images in the ./public/images directory and upload them to your Store.
Start the development server:
bun devOpen http://localhost:3000 in your browser and start searching for images using natural language queries.
- Mixedbread Documentation - Learn about Mixedbread's features and APIs
- Quickstart Guide - Get started with creating Stores and uploading files
- Mixedbread Discord - Join the community and get support