How to Generate Embeddings with Voyage AI for Better Search
Voyage AI is an embeddings API that turns text into vectors optimized for search and retrieval. You send text, it returns a numeric vector you store in a vector database, and better embeddings mean more relevant search results without changing anything else in your stack.
It is a narrow tool. No chatbot, no dashboard. If you need a full RAG platform, look elsewhere; if you need the embedding layer done well, this is the part that decides whether retrieval works.
How do you get an API key and make a first call?
Sign up at voyageai.com, create a key, then call the API. A minimal Python example:
import voyageai
vo = voyageai.Client(api_key="YOUR_KEY")
res = vo.embed(["how do vector databases work"], model="voyage-3")
print(len(res.embeddings[0]))
Each model returns a fixed-length vector — 1024 dimensions for voyage-3. You store those alongside your text in whatever vector store you run, then query with the same model at search time.
Which Voyage model should you pick?
Match the model to the job:
- voyage-3 — general-purpose, good default for mixed content.
- voyage-3-lite — cheaper and faster, fine for high-volume, low-stakes search.
- voyage-code-3 — trained on code, better for repositories and technical docs.
- voyage-law-2 — legal text, where terminology matters.
Domain models beat the general model on their own turf. Do not assume voyage-3 is always the answer; on a code index, voyage-code-3 usually retrieves more relevant chunks.
Is Voyage AI free to start?
New accounts get a free token allowance — on the order of hundreds of millions of tokens for the lite model, enough to embed a large corpus before paying. After that it is usage-based per token, with cheaper rates on the lite and domain models. Check current rates before a big ingestion job, because embedding a million documents is not free.
What are the common mistakes?
Mixing models between indexing and querying. If you embed documents with voyage-3 and query with voyage-3-lite, the vectors live in different spaces and results degrade badly. Pick one model per index and write it down.
Second: not batching. The API takes a list of texts up to a per-request limit, so sending one string at a time wastes most of your throughput. Batch a hundred documents per call and the ingestion job finishes far sooner.
Quick Summary
- Voyage AI is an embeddings API for search and retrieval, not a chatbot platform.
- voyage-3 is the general default; code and legal content have dedicated models.
- New accounts get a free token allowance on the lite model.
- Never mix embedding models between indexing and querying one index.
- Batch documents per request — one-at-a-time calls waste throughput.
If you want a managed pipeline around these vectors, see Contextual AI.
