← All articles

LLM Embeddings and Reranking APIs Across Providers: OpenAI, DashScope, Cohere, Voyage AI, and Jina Compared

A cross-provider reference for embedding and reranking APIs: model specs, dimensions, pricing, OpenAI SDK compatibility, and decision matrix for RAG pipelines across OpenAI, DashScope (Qwen3), Cohere, Voyage AI, and Jina.

· TheRouter

Embedding and reranking APIs are the backbone of every RAG pipeline, yet each provider wraps them differently — different model IDs, dimension controls, pricing units, and SDK patterns. We built this reference so you can compare them side-by-side and pick the right stack without reading five sets of docs.

OpenAI-compatible means a provider exposes a chat-completions endpoint whose request and response shape matches the OpenAI API contract closely enough that an unmodified OpenAI SDK call works against it after swapping three values: API key, base URL, and model name. The minimum surface in practice is POST /v1/chat/completions with messages, model, and an OpenAI-shaped streaming response.

TL;DR — Provider Comparison Table

ProviderEmbedding ModelsMax DimensionsMax TokensRerankingPricing (per 1M tokens)
OpenAItext-embedding-3-small, text-embedding-3-large1536 / 30728191No native reranker$0.02 (small), $0.13 (large)
DashScopetext-embedding-v3, Qwen3-Embedding-0.6B/4B/8B1024–40968192–32Kqwen3-rerank (replaced gte-rerank May 30)¥0.7/1M (~$0.10) for v3
CohereEmbed 410244096Rerank 3.5, Rerank 4 Fast, Rerank 4 Pro$4.00–$5.00/1M searches
Voyage AIvoyage-4-large, voyage-4, voyage-4-lite256–204832000rerank-2.5, rerank-2.5-lite$0.05–$0.18/1M tokens
Jinajina-embeddings-v4, jina-embeddings-v5up to 40968192jina-reranker-v2~$0.02–$0.12/1M tokens

Prices retrieved August 2026 from official pricing pages; verify current rates before committing.

OpenAI Embeddings

OpenAI offers two current embedding models through the /v1/embeddings endpoint:

text-embedding-3-small — 1536 dimensions (default), supports MRL dimension reduction down to 256. Priced at $0.02 per 1M tokens (50% batch discount available). Best for cost-sensitive workloads where English-dominant retrieval is sufficient.

text-embedding-3-large — 3072 dimensions (default), also supports MRL reduction to 256. Priced at $0.13 per 1M tokens. Higher quality on MTEB benchmarks, particularly for multilingual and complex semantic tasks.

Both models accept up to 8191 input tokens per request and return normalized float vectors.

from openai import OpenAI

client = OpenAI()

response = client.embeddings.create(
    model="text-embedding-3-large",
    input="What embedding model should I use for RAG?",
    dimensions=1024  # MRL: reduce from 3072 to 1024
)

vector = response.data[0].embedding
print(f"Dimensions: {len(vector)}")  # 1024

No native reranker. OpenAI does not offer a reranking endpoint. RAG pipelines using OpenAI embeddings typically pair them with Cohere Rerank or an open-source reranker like BGE-reranker-v2-m3.

For a broader look at OpenAI API patterns, see our OpenAI API rate limits and multi-provider fallback guide.

Sources: OpenAI Embeddings docs (retrieved 2026-08-07), OpenAI Pricing (retrieved 2026-08-07).

DashScope (Alibaba Cloud Model Studio) Embeddings and Reranking

DashScope provides both a managed embedding model (text-embedding-v3) and the open-weight Qwen3-Embedding series, plus a dedicated reranking family.

Embedding Models

text-embedding-v3 — The default managed embedding model. 1024 dimensions, customizable via the dimensions parameter. Priced at ¥0.7 per 1M tokens (~$0.10 international). Supports the OpenAI-compatible /v1/embeddings endpoint — change base_url to https://dashscope-intl.aliyuncs.com/compatible-mode/v1 and it works with the OpenAI Python SDK.

Qwen3-Embedding series (launched June 2025):

ModelParametersMax TokensDefault DimensionsMRL (Custom Dims)
Qwen3-Embedding-0.6B0.6B32K1024Yes (256–1024)
Qwen3-Embedding-4B4B32K2560Yes (256–2560)
Qwen3-Embedding-8B8B32K4096Yes (256–4096)

Qwen3-Embedding-8B scores 70.58 on MTEB Multilingual, outperforming Google's Gemini-Embedding model. All three sizes support instruction-aware embeddings and 100+ languages including programming languages.

Reranking Models

DashScope replaced gte-rerank (sunset May 30, 2026) with the Qwen3-Reranker family:

ModelParametersMax TokensMTEB-R Score
Qwen3-Reranker-0.6B0.6B32K65.80
Qwen3-Reranker-4B4B32K69.76
Qwen3-Reranker-8B8B32K69.02
from openai import OpenAI

client = OpenAI(
    api_key="your-dashscope-key",
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
)

# Embedding request — same OpenAI SDK
response = client.embeddings.create(
    model="text-embedding-v3",
    input="RAG pipeline embedding comparison",
    dimensions=1024
)

For a complete DashScope integration walkthrough, see our Aliyun Bailian API guide and the DashScope Qwen3.7 series guide.

Sources: Alibaba Cloud blog: Mastering Embedding with Qwen3 (retrieved 2026-08-07), Qwen3-Embedding technical report (retrieved 2026-08-07), DashScope pricing (retrieved 2026-08-07).

Cohere Embed and Rerank

Cohere specializes in retrieval: their Embed 4 and Rerank models are purpose-built for search and RAG, not general text generation.

Embed 4 — Produces embeddings optimized for search and classification. Supports search_document, search_query, classification, and clustering input types. Priced at $4.00–$5.00 per 1M searches (not per token — Cohere prices by API call volume on paid plans). Context length: 4096 tokens. Available on AWS Bedrock and Google Cloud.

Rerank 3.5 — Takes a query + list of documents and returns relevance scores. Priced at $5.00 per 1M searches. Supports 4096-token documents. The go-to choice when you need a reranker but don't want to self-host.

Rerank 4 Fast / Rerank 4 Pro — Newer reranking models at the same $5.00/1M price point, with improved accuracy.

Cohere uses its own SDK (not OpenAI-compatible), though gateways like LiteLLM and Portkey normalize the interface.

import cohere

co = cohere.ClientV2(api_key="your-cohere-key")

# Reranking: refine top-k results
results = co.rerank(
    model="rerank-v3.5",
    query="best embedding model for RAG",
    documents=[
        "OpenAI text-embedding-3-large offers 3072 dimensions...",
        "Cohere Embed 4 is optimized for search and classification...",
        "BGE-M3 is an open-source multilingual embedding model..."
    ],
    top_n=2
)

for r in results.results:
    print(f"Index: {r.index}, Score: {r.relevance_score:.4f}")

Sources: Cohere Pricing (retrieved 2026-08-07), Cohere Rerank docs (retrieved 2026-08-07).

Voyage AI (MongoDB) Embeddings and Reranking

Voyage AI, now part of MongoDB, offers domain-specialized embedding and reranking models with strong MTEB performance.

Embedding Models (voyage-4 series, January 2026)

ModelContextDefault DimsCustom DimsPrice (per 1M tokens)
voyage-4-large32K1024256, 512, 2048$0.18
voyage-432K1024256, 512, 2048$0.12
voyage-4-lite32K1024256, 512, 2048$0.05
voyage-4-nano (open-weight)32K512128, 256—

All voyage-4 series embeddings are cross-compatible — vectors from voyage-4-large and voyage-4-lite can be compared directly, enabling a mix of high-quality indexing with cheap query embedding.

Domain-specific models: voyage-code-3 (code retrieval), voyage-finance-2, voyage-law-2 — tuned for specialized corpora.

Reranking Models

ModelDescription
rerank-2.5General-purpose reranker, highest quality
rerank-2.5-liteLower latency, slightly reduced accuracy

Voyage uses its own API endpoint (not OpenAI-compatible natively). LiteLLM provides a Voyage provider integration.

Sources: Voyage AI Models Overview (MongoDB docs) (retrieved 2026-08-07), LiteLLM Voyage docs (retrieved 2026-08-07).

Jina Embeddings and Reranking

Jina AI provides multimodal and multilingual embedding models, plus a reranker, through their own API.

jina-embeddings-v4 — Multimodal embedding model supporting text and images. Each image tile costs 10 tokens. Multiple task-specific LoRA adapters for retrieval, classification, and text matching. Supports up to 8192 tokens.

jina-embeddings-v5 — Latest generation with improved multilingual performance.

jina-reranker-v2 — Cross-encoder reranker for refining retrieval results.

Jina uses its own API endpoint at https://api.jina.ai/v1/embeddings. The endpoint schema resembles OpenAI's /v1/embeddings format, making integration relatively straightforward.

Sources: Jina Embeddings API (retrieved 2026-08-07), Jina AI on Hugging Face (retrieved 2026-08-07).

SiliconFlow Hosted Embedding Models

SiliconFlow hosts several open-source embedding models including BAAI/bge-m3 and BAAI/bge-large-zh-v1.5 at competitive prices, sometimes with free tier availability for small models.

For teams already routing chat completions through SiliconFlow, using their hosted embeddings avoids managing a separate provider integration.

See our SiliconFlow API complete guide and SiliconFlow free models routing guide for setup details.

Decision Matrix: Which Embedding + Reranking Stack for Your Use Case

Use CaseRecommended EmbeddingRecommended RerankerWhy
Cost-optimized English RAGOpenAI text-embedding-3-small ($0.02/1M)Cohere Rerank 3.5Cheapest embedding, proven reranker
Multilingual production RAGQwen3-Embedding-8B or voyage-4-largeQwen3-Reranker-4B or rerank-2.5Top MTEB multilingual scores, 32K context
Chinese-dominant workloadsDashScope text-embedding-v3qwen3-rerankOpenAI-compatible, lowest latency in China
Code retrievalvoyage-code-3 or Qwen3-Embedding-8BQwen3-Reranker-8BDomain-tuned for code, strong on MTEB-Code
Budget self-hostedBAAI/bge-m3 (via SiliconFlow)BGE-reranker-v2-m3Open-weight, no API cost at scale
Maximum qualityvoyage-4-large + dimension 2048rerank-2.5Top benchmark scores, 32K context

Dimension Reduction Tradeoffs

All modern embedding providers now support Matryoshka Representation Learning (MRL) — the ability to truncate embedding vectors to fewer dimensions while retaining most semantic information:

  • OpenAI: text-embedding-3-large at 256 dims retains ~96% of full 3072-dim quality on MTEB
  • DashScope: Qwen3-Embedding-4B supports 256–2560 custom dimensions
  • Voyage: voyage-4 series supports 256, 512, 1024, 2048

When to reduce dimensions:

  • Vector database storage costs dominate (e.g., millions of documents in Pinecone/Qdrant)
  • Query latency matters more than marginal quality gains
  • You need cross-compatible vectors between embedding model tiers (voyage-4 series)

When to keep full dimensions:

  • Legal, medical, or financial domains where retrieval precision is critical
  • Corpus is small enough that storage isn't a concern

Routing Embedding Requests Across Providers

When routing embedding requests through a gateway like TheRouter, keep these differences in mind:

  1. Endpoint compatibility: OpenAI and DashScope both use /v1/embeddings with the same schema. Cohere, Voyage, and Jina require SDK adapters or gateway normalization.

  2. Dimension parameter: The dimensions parameter works identically across OpenAI and DashScope but is handled differently by Cohere (fixed per model) and Voyage (set at request time).

  3. Token counting: Different tokenizers mean the same text produces different token counts across providers. A 500-word document might be 700 tokens with OpenAI's tiktoken but 650 tokens with DashScope's tokenizer.

  4. Vector compatibility: Embeddings from different providers are not interchangeable. You cannot index with OpenAI embeddings and query with DashScope embeddings — the vector spaces are different.

  5. Fallback considerations: Unlike chat completions where fallback is straightforward, embedding fallback requires re-indexing your entire corpus with the fallback provider's model. Plan your primary embedding provider carefully.

For more on multi-provider routing patterns, see our LLM API cost optimization routing strategies guide and the unified LLM API providers gateway comparison.

FAQ

Should I embed queries and documents with the same model?

Yes. Embedding vectors are only comparable when produced by the same model. Some providers (Cohere) use separate input_type parameters for queries vs. documents, which adjusts the embedding internally — but the model itself must be the same.

How does chunking strategy affect embedding quality?

Shorter chunks (256–512 tokens) work better with smaller-context embedding models. For models with 32K context (Qwen3-Embedding, Voyage 4), you can embed larger chunks or even full documents, but retrieval precision may drop for long passages. Experiment with your specific corpus.

Can I mix embedding providers in a single vector database?

No. Each provider's embedding model produces vectors in a different semantic space. All vectors in a single collection/index must come from the same model. If you switch providers, you need to re-embed your entire corpus.

What's the latency difference between embedding and reranking?

Embedding is typically fast (5–20ms per request for short text). Reranking is slower because it cross-encodes the query against each candidate — expect 50–200ms for reranking 25 documents, depending on document length and model size.


Pricing and model availability verified August 2026. Provider pricing changes frequently — check official docs before production deployment.

Help & contact