Voyage
voyage-4
voyageai/voyage-4
A general-purpose, multilingual embedding model from Voyage (MongoDB) for retrieval and search. Supports 2048, 1024, 512, and 256 dimensions with several quantization options.
RoleThe search index
—
In / M
—
Out / M
—
Context
- AA intelligence index
- Not on listing
- Inputs
- —
- Outputs
- —
- Tools
- —
- Structured output
- —
- Reasoning
- —
- Weights
- Not verified
- Listed
- —
01 · What it's good at
Use it for this.
Three jobs this model is built for, and the ones to give to something else.
01
Semantic search and RAG indexes
02
Multilingual retrieval
03
Trading vector size for storage cost (256 to 2048 dims)
Skip it for
- Writing the answer. Pair it with a reranker and a chat model
- Code search, where voyage-code-4 is the specialist
02 · Example tasks
What you'd actually send it.
Real inputs, not a benchmark. Paste one into the snippet below to try it.
You send
Embed every help-center article, chunked by heading, and store vectors with the article URL.
Why this model
The first step of any RAG pipeline.
03 · Your stack
Where it sits: Retrieve.
Index time: chunk documents and embed them into a vector store (pgvector, Pinecone, Qdrant, or in memory to start). Query time: embed the question with the same model, take the top 20 to 50 hits, and pass them to a reranker.
Layer 01 · this model
Retrieve
Layer 02
Plan & reason
Layer 03
Do the volume
Layer 04
Gate & route
Layer 05
Draw, speak, listen
04 · Wire it up
One request. Paste and run.
Uses OpenRouter, so one key works for every model on this site. Set OPENROUTER_API_KEY and swap the prompt for one of the tasks above.
const res = await fetch("https://openrouter.ai/api/v1/embeddings", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OPENROUTER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "voyageai/voyage-4",
"input": [
"How do I reset my password?",
"Billing runs on the first of each month.",
"SSO is available on the Business plan."
]
}),
});
const { data } = await res.json();
// One vector per input, in order. Store each with its source text.
const vectors = data.map((item: { embedding: number[] }) => item.embedding);
console.log(vectors.length, vectors[0].length);
05 · Watch out for
Gotchas.
Embed queries and documents with the same model. Vectors from different models do not mix.
Chunk long documents even though inputs can be long. Smaller chunks usually retrieve better.
Sources
Lessons are written from each model's listing and the linked docs. We don't publish our own benchmark numbers; the index above is Artificial Analysis, as shown on OpenRouter.
Keep learning