Installation
Python usage
Basic setup
Available models
Chroma supports all OpenAI embedding models:- Latest models
- Legacy models
Custom dimensions
API configuration
JavaScript usage
Configuration
string
required
Your OpenAI API key
string
default:"text-embedding-3-small"
OpenAI embedding model to use
int
Number of dimensions (text-embedding-3 models only)
string
Custom API endpoint URL
string
OpenAI organization ID
Cost optimization
Azure OpenAI
Error handling
Best practices
Choose the right model
Use
text-embedding-3-small for most use cases. Only use text-embedding-3-large if you need the highest quality.Batch requests
Process documents in batches to avoid rate limits and improve throughput.
Cache embeddings
Store embeddings to avoid re-computing them for the same content.
Monitor costs
Track your API usage and consider using reduced dimensions to lower costs.