Embeddings API Comparison: OpenAI vs Cohere vs Voyage vs Jina
Text embedding models convert text into high-dimensional vectors for semantic search, RAG retrieval, clustering, and classification. Choosing the right model involves balancing quality (MTEB score), context length, cost, and hosting requirements. This guide compares all major commercial and open-source embedding APIs side-by-side.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
JSON Formatter & Validator
Format, beautify, and validate JSON online. Paste your JSON to instantly pretty-print it with 2-space, 4-space, or tab indentation. Minify JSON too. Free, runs in your browser.
Open free tool →
Regex Tester
Free regex tester. Test regular expressions against multiple strings with expected match/no-match assertions — see instant pass/fail results. Built-in presets for email, URL, IPv4, and phone. Pro: unl
Open free tool →
Base64 Encoder & Decoder
Free Base64 Encoder & Decoder. Convert text, images, and any file to Base64 and back. Supports URL-safe Base64, image data URIs, and file download from Base64. Runs 100% in your browser — no data sent
Open free tool →
More Free Tools
Related Articles
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
Best AI Code Review Tools 2026: CodeRabbit, Sourcery, DeepCode & Bito Compared
Compare top AI code review tools for 2026: CodeRabbit, Sourcery, DeepCode, and Bito. Features, pricing, GitHub/GitLab integration, and choosing the right tool for your team.
AI Code Review Tools 2026: GitHub Copilot, CodeRabbit, Qodo Merge Ranked
Compare AI code review tools for 2026: GitHub Copilot code review, CodeRabbit, Qodo Merge, Sourcery, and PR-Agent. Pricing, accuracy, and GitHub integration.
AI Coding Tools Comparison 2026: GitHub Copilot vs Cursor vs Windsurf vs Cline
Comprehensive comparison of the best AI coding tools in 2026: GitHub Copilot, Cursor, Windsurf, and Cline. Pricing, features, model support, and real-world benchmarks.
AI Pair Programming in 2026: GitHub Copilot vs Cursor vs Claude Code
Master AI pair programming in 2026. Compare GitHub Copilot, Cursor, and Claude Code for autocomplete, chat, and agentic workflows. Includes setup guides and productivity tips.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →Full Model Comparison Table
| Provider | Model | Dims | Context | $/1M tokens | MTEB avg | Notes |
|---|---|---|---|---|---|---|
| OpenAI | text-embedding-3-small | 1,536 | 8,191 | $0.02 | 62.3 | Best price/performance. MRL configurable. |
| OpenAI | text-embedding-3-large | 3,072 | 8,191 | $0.13 | 64.6 | Highest quality OpenAI model. |
| OpenAI | text-embedding-ada-002 | 1,536 | 8,191 | $0.10 | 60.5 | Legacy. Still widely deployed. |
| Cohere | embed-english-v3.0 | 1,024 | 512 | $0.10 | 64.5 | Strong multilingual, int8 output. |
| Cohere | embed-multilingual-v3.0 | 1,024 | 512 | $0.10 | 62.4 | 100+ languages, asymmetric retrieval. |
| Voyage AI | voyage-3 | 1,024 | 32,000 | $0.06 | 67.1 | Top MTEB general retrieval score. |
| Voyage AI | voyage-code-2 | 1,536 | 16,000 | $0.12 | — | Best for code retrieval tasks. |
| Jina AI | jina-embeddings-v3 | 1,024 | 8,192 | $0.02 | 65.3 | Long context, task-specific LoRA. |
| HuggingFace | BGE-M3 | 1,024 | 8,192 | Free | 66.8 | Open source, multi-func, multilingual. |
| HuggingFace | all-MiniLM-L6-v2 | 384 | 256 | Free | 56.3 | Ultra-fast, lightweight, great for local. |
| Nomic AI | nomic-embed-text-v1.5 | 768 | 8,192 | Free | 62.0 | Open source, MRL configurable dims. |
MTEB scores are approximate averages from the public leaderboard. Scores vary by task subset. Free = open-source, self-hosted. Costs as of 2026.
OpenAI Embeddings: text-embedding-3-small & large
The most widely used embedding API — supports Matryoshka dimension reduction for storage optimization.
from openai import OpenAI
import numpy as np
client = OpenAI()
# Standard embedding — 1536 dims
response = client.embeddings.create(
model="text-embedding-3-small",
input=["RAG combines retrieval with LLM generation",
"Vector databases store high-dimensional embeddings"]
)
embeddings = [item.embedding for item in response.data]
print(f"Shape: {len(embeddings)} x {len(embeddings[0])} dims")
# Matryoshka dimension reduction — truncate to 512 dims (saves 66% storage)
response_small = client.embeddings.create(
model="text-embedding-3-small",
input=["Compact embedding for storage-optimized RAG"],
dimensions=512 # reduce from 1536 to 512
)
print(f"Reduced dims: {len(response_small.data[0].embedding)}")
# Cosine similarity between two embeddings
def cosine_sim(a, b):
a, b = np.array(a), np.array(b)
return np.dot(a, b) / (np.linalg.norm(a) * np.linalg.norm(b))
sim = cosine_sim(embeddings[0], embeddings[1])
print(f"Cosine similarity: {sim:.4f}") # ~0.7-0.8 for related topics Cohere Embed v3 & Voyage AI
Cohere requires specifying input_type for asymmetric retrieval. Voyage AI leads MTEB general retrieval benchmarks.
import cohere
import voyageai
# COHERE — asymmetric retrieval with input_type
co = cohere.Client("YOUR_COHERE_KEY")
# Embed documents at indexing time
doc_embeddings = co.embed(
texts=["Qdrant supports sparse and dense hybrid search",
"pgvector adds vector search to PostgreSQL"],
model="embed-english-v3.0",
input_type="search_document", # use this for indexed documents
embedding_types=["float"] # float | int8 | uint8 | binary
).embeddings.float
# Embed queries at search time
query_embeddings = co.embed(
texts=["how does hybrid vector search work?"],
model="embed-english-v3.0",
input_type="search_query", # use this for user queries
embedding_types=["float"]
).embeddings.float
print(f"Doc dims: {len(doc_embeddings[0])}") # 1024
# VOYAGE AI — top MTEB general retrieval performance
vo = voyageai.Client(api_key="YOUR_VOYAGE_KEY")
result = vo.embed(
texts=["Voyage AI achieves state-of-the-art retrieval accuracy",
"MTEB benchmark measures embedding quality across 56 tasks"],
model="voyage-3",
input_type="document" # "document" or "query"
)
voyage_embeddings = result.embeddings
print(f"Voyage dims: {len(voyage_embeddings[0])}") # 1024
print(f"Total tokens used: {result.total_tokens}") Use Case Recommendations
General RAG (Best Value)
OpenAI text-embedding-3-small — excellent MTEB score at $0.02/1M tokens. Most integrations support it natively.
Maximum Retrieval Accuracy
Voyage AI voyage-3 — leads MTEB retrieval benchmarks. Worth the premium for accuracy-critical apps.
Multilingual Applications
Cohere embed-multilingual-v3.0 — 100+ languages with consistent quality. Use input_type for best retrieval.
Code Retrieval
Voyage AI voyage-code-2 — purpose-trained for code search. Dramatically outperforms general models on code.
Privacy / Zero API Cost
BGE-M3 or nomic-embed-text-v1.5 — run locally, competitive MTEB, zero cost. Use with sentence-transformers.
Edge / Lightweight
all-MiniLM-L6-v2 — only 384 dims, runs on CPU, <100ms latency. Ideal for edge devices and high-QPS local search.
Frequently Asked Questions
What are text embeddings and how do they work?▼
Text embeddings are numerical representations of text as high-dimensional vectors. An embedding model converts a sentence, paragraph, or document into a list of floating-point numbers (e.g., 1536 numbers for text-embedding-3-small). Texts with similar meaning produce vectors that are close together in the vector space — measurable with cosine similarity. This mathematical relationship enables semantic search, RAG retrieval, clustering, classification, and duplicate detection.
What is the MTEB benchmark?▼
MTEB (Massive Text Embedding Benchmark) is the standard benchmark for evaluating embedding models across 56 tasks in 8 categories: retrieval, clustering, classification, reranking, STS, summarization, bitext mining, and pair classification. The MTEB leaderboard (huggingface.co/spaces/mteb/leaderboard) ranks hundreds of models. A high MTEB score, especially on the 'Retrieval' category, correlates strongly with RAG performance.
OpenAI text-embedding-3-small vs text-embedding-3-large: when to use each?▼
text-embedding-3-small (1536 dims, $0.02/1M tokens) is the best price-performance choice for most RAG applications — it outperforms the old ada-002 on MTEB while costing 5x less. text-embedding-3-large (3072 dims, $0.13/1M tokens) provides higher quality for complex reasoning, multilingual tasks, and applications where accuracy is critical and cost is secondary. The large model supports Matryoshka dimension reduction to 256 or 1024 dims.
What is Voyage AI and when should I use it?▼
Voyage AI provides specialized embedding models optimized for specific domains: voyage-code-2 for code retrieval, voyage-law-2 for legal documents, voyage-finance-2 for financial text, and voyage-3 for general use. Voyage models consistently rank at or near the top of MTEB retrieval benchmarks. Use Voyage when you need maximum retrieval accuracy for your specific domain and are willing to pay a modest premium over OpenAI embeddings.
What is Cohere embed-v3 good for?▼
Cohere embed-v3 (embed-english-v3.0 and embed-multilingual-v3.0) is especially strong for multilingual applications — it supports 100+ languages with consistent performance. A unique feature is input_type specification: you pass 'search_document' when embedding stored documents and 'search_query' when embedding user queries, which improves asymmetric retrieval quality. It also supports int8 and binary output for storage-efficient embeddings.
When should I use local/open-source embedding models?▼
Use local models (all-MiniLM-L6-v2, BGE-M3, nomic-embed-text, E5-large) when: (1) data privacy requires no external API calls, (2) you need zero per-token cost at large scale, (3) latency requirements are strict and network round-trips matter, (4) you want to avoid vendor lock-in. The trade-off: you manage model serving infrastructure. BGE-M3 and E5-Mistral-7B are competitive with OpenAI embeddings on MTEB.
Related Products
on GumroadAI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →AI Developer Prompts Pack
55 battle-tested prompt templates for the workflows developers actually use: code review, debugging, architecture, documentation, and testing. Stop writing prompts from scratch.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
AI Hallucination Detector
Scan LLM-generated text for hallucination risk signals: fabricated citations, overconfident claims, suspect statistics, and verification gaps. Risk score 0-100 with highlighted problem spans.
Open free tool →
AI Safety Checklist Generator
Generate a customized AI safety evaluation checklist for your deployment. Covers technical safety, content moderation, security, bias, privacy, and regulatory compliance. Export to Markdown.
Open free tool →
CrewAI Agent Config Generator
Build CrewAI agent configurations visually. Define roles, goals, backstories, and tools. Generate YAML or Python code for multi-agent crews.
Open free tool →
More Free Tools
Related Articles
Vector Database Comparison 2026: Pinecone vs Weaviate vs Qdrant vs Chroma
In-depth comparison of the top vector databases in 2026. Evaluate Pinecone, Weaviate, Qdrant, and Chroma on performance, scalability, filtering, pricing, and self-hosting for production AI applications.
Vector Databases Explained: Pinecone vs Weaviate vs Qdrant vs Chroma (2026 Guide)
A complete comparison of the best vector databases in 2026: Pinecone, Weaviate, Qdrant, Chroma, and pgvector. Pricing, code examples, performance benchmarks, and a clear decision framework for AI and LLM applications.
Building a RAG Pipeline from Scratch: Embeddings, Vector Databases, and Retrieval
Step-by-step guide to building a production-ready RAG pipeline in Python. Covers embeddings, chunking strategies, Chroma and Pinecone setup, hybrid search, reranking, and evaluation with RAGAS.
Building Production RAG Systems with LlamaIndex and Vector Databases 2026
Complete guide to building production-ready RAG systems with LlamaIndex v0.10+. Covers chunking strategies, embedding models, Chroma, Pinecone, Weaviate integration, and advanced retrieval patterns.
Building a Production RAG Pipeline: Complete Implementation Guide 2026
A comprehensive guide to building production-ready RAG pipelines in 2026. Covers chunking strategies, embedding models, vector store selection, retrieval techniques, reranking, evaluation with RAGAS/TruLens, and LangChain vs LlamaIndex vs custom implementations.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →