Overview
NanoGPT provides a fully OpenAI-compatible embeddings API that offers access to both OpenAI’s industry-leading embedding models and a curated selection of alternative embedding models at competitive prices. Our API supports 20+ embedding models (and this list changes over time); useGET /api/v1/embedding-models for the source-of-truth list.
Quick Start
Available Models
OpenAI Models
Alternative Models
Multilingual Models
Language-Specific Models
Specialized Models
API Endpoints
Create Embeddings
Endpoint:POST https://nano-gpt.com/api/v1/embeddings
Create embeddings for one or more text inputs.
Discover Embedding Models
Endpoint:GET https://nano-gpt.com/api/v1/embedding-models
List all available embedding models with detailed information.
Advanced Features
Batch Processing
Process multiple texts efficiently in a single request:Dimension Reduction
Reduce embedding dimensions for faster similarity comparisons (supported models only):text-embedding-3-smalltext-embedding-3-largeQwen/Qwen3-Embedding-0.6B
Base64 Encoding
For more efficient data transfer, request base64-encoded embeddings:Use Cases
Semantic Search
Build powerful search systems that understand meaning:RAG (Retrieval Augmented Generation)
Enhance LLM responses with relevant context:Clustering & Classification
Group similar texts or classify content:Duplicate Detection
Find similar or duplicate content:Model Selection Guide
By Use Case
By Requirements
Need fastest search?- Use models supporting dimension reduction
- Reduce to 256-512 dimensions
- Trade small accuracy loss for 2-4x speed improvement
- Use
text-embedding-3-large - Keep full 3072 dimensions
- Best for critical applications
- Use
BAAI/bge-m3for general multilingual - Use language-specific Jina models for best per-language performance
- Use
jina-embeddings-v2-base-code - Optimized for programming language semantics
Best Practices
Performance Optimization
- Batch Requests: Send up to 2048 texts in a single request
- Use Dimension Reduction: Reduce dimensions when exact precision isn’t critical
- Cache Embeddings: Store computed embeddings to avoid re-processing
- Choose Appropriate Models: Don’t use 3072-dimension models if 768 suffices
Cost Optimization
- Monitor Usage: Track the
usagefield in responses - Start Small: Begin with
text-embedding-3-smallbefore upgrading - Implement Caching: Avoid re-embedding identical content
- Batch Processing: Reduce API call overhead
Quality Optimization
- Preprocess Text: Clean and normalize text before embedding
- Consider Context: Include relevant context in the text to embed
- Test Different Models: Compare performance for your specific use case
- Use Appropriate Similarity Metrics: Cosine similarity for most cases