Vector buckets organize your vector data into logical units. Within each bucket, you create indexes that define how vectors are stored and searched based on their dimensions and distance metrics.
Creating a Vector bucket
You can create vector buckets using either the Zuvo Studio or the SDK.
Using the Zuvo Studio
- Navigate to the Storage section in the Zuvo Studio.
- Click Create Bucket.
- Enter a name for your bucket (e.g.,
embeddingsorsemantic-search). - Select Vector Bucket as the bucket type.
- Click Create.
Your vector bucket is now ready. The next step is to create indexes within it.
Using the SDK
import { createClient } from '@supabase/supabase-js'
const supabase = createClient('https://your-project-id.supabase.co', 'your-service-key')
// Create a vector bucket
await supabase.storage.vectors.createBucket('embeddings')
console.log('✓ Vector bucket created: embeddings')
Creating indexes
Indexes organize vectors within a bucket with consistent dimensions and distance metrics. For comprehensive index management documentation, see Working with Vector Indexes.
Quick start: Creating an index via Dashboard
- Open your vector bucket.
- Click Create Index.
- Enter an index name (e.g.,
documents-openai). - Set the dimension matching your embeddings (e.g.,
1536for OpenAI's text-embedding-3-small). - Select the distance metric (
cosine,euclidean, orl2). - Click Create.
Quick start: Creating an index via SDK
const bucket = supabase.storage.vectors.from('embeddings')
// Create an index
await bucket.createIndex({
indexName: 'documents-openai',
dataType: 'float32',
dimension: 1536,
distanceMetric: 'cosine',
})
console.log('✓ Index created: documents-openai')
Key details
- Dimension must match your embedding model (e.g., 1536 for OpenAI)
- Distance metric (
cosine,euclidean, orl2) is immutable after creation - Maximum indexes per bucket: 10
- Maximum batch size: 500 vectors per operation
For detailed information on distance metrics, embedding dimensions, managing multiple indexes, and advanced index operations, see Working with Vector Indexes.
Next steps
After creating your bucket and indexes, you can: