LLM Integration & APIs
Top 5 Embedding APIs for Building Semantic Retrieval in AI Agent Pipelines
Choosing an embedding API for an agent’s knowledge retrieval is not just a model decision. Vector dimensions affect how embeddings fit your index, while language and input support determine whether a model suits the material you need to retrieve.
Request limits, batching, and cloud-service requirements can also shape the work involved in indexing and maintaining that data.
This shortlist compares five options by their documented capabilities and practical constraints, rather than declaring one API the winner for every pipeline. It covers OpenAI’s Embeddings API, Cohere Embed, Gemini Embedding 2, Voyage AI’s Voyage 4 family, and Amazon Titan Text Embeddings v2.
Their differences include configurable vector sizes, multilingual support, image inputs, retrieval-specific query and document modes, and batch processing.
I’d treat those features as starting points, not proof of retrieval quality. Before committing, check the model against your corpus, your vector store’s requirements, and the deployment setup you can support.

Quick picks
- OpenAI Embeddings API — configurable dimensions: A practical option for an API-based pipeline using a separate vector database. Its documented input limit is 8,192 tokens, and the supplied documentation does not establish a language list or self-hosting option.
- Cohere Embed v4.0 — multilingual and image-inclusive retrieval: Offers text, image, and mixed inputs, with documented support for over 100 languages. Its endpoint requires the appropriate input type and accepts up to 96 inputs per call.
- Google Gemini Embedding 2 — batch-oriented indexing: Worth considering when indexing can run in batches rather than requiring immediate results. Plan for re-embedding if migrating from Gemini Embedding 001, since their vectors are incompatible.
- Voyage AI Voyage 4 — flexible retrieval representations: Provides query and document input modes, adjustable dimensions, and supported quantized output types. Check model-specific aggregate token limits and split requests above 1,000 texts.
- Amazon Titan Text Embeddings v2 — AWS and primarily English workflows: Offers three vector sizes and on-demand or provisioned-throughput inference through Bedrock. AWS describes it as optimized for English and warns that cross-language queries may be suboptimal.
Product shortlist
1. OpenAI Embeddings API — text-embedding-3-small / text-embedding-3-large
OpenAI Embeddings API — text-embedding-3-small / text-embedding-3-largeOpenAI’s Embeddings API is a straightforward option if you want to generate vectors through an API and store them in a separate vector database. The two third-generation models offer different default vector sizes, and you can request smaller outputs when a 3,072-dimensional vector is more than your retrieval pipeline needs.
I’d shortlist it when adjustable dimensions and a direct API endpoint suit your workflow, but check language fit and deployment requirements before committing.
What I like
- You can choose between 1,536-dimensional
text-embedding-3-smalland 3,072-dimensionaltext-embedding-3-largeoutputs, then request smaller dimensions to better fit your storage and retrieval setup. - The direct embeddings endpoint returns vectors for your application to use with a separate vector database, keeping generation and storage as distinct parts of the pipeline.
- Input-token billing gives you a clear usage metric to estimate when planning indexing volume.
Limitations
- The documented maximum input is 8,192 tokens, so longer documents need to be split or otherwise prepared before embedding.
- The documentation supplied here does not specify a language-coverage list or establish a self-hosting option; verify those constraints against your data and deployment needs.
My take
The practical choice is between the smaller default vector and the larger one, with dimension reduction available if you need to manage vector size. I’d compare the resulting retrieval quality on your own queries and corpus rather than assume that more dimensions will automatically improve results.
Generation is only one stage of the pipeline: you still need to store vectors and implement retrieval separately. This is a good fit for API-based workflows, but teams with strict self-hosting or language requirements should confirm those points before selecting it.
Best for
A good fit for developers building API-based semantic retrieval who want configurable vector dimensions and plan to use a separate vector database. Check language coverage and deployment fit first if those are hard requirements.
Sources: Vector embeddings | OpenAI API; Create embeddings | OpenAI API Reference.
2. Cohere Embed API — embed-v4.0
Cohere Embed API — embed-v4.0Cohere’s embed-v4.0 stands out when an agent’s knowledge base includes more than plain text. It accepts text, images, or mixed inputs, and offers several vector sizes so you can choose a dimensionality that fits your retrieval setup.
I’d shortlist it for multilingual or visually rich collections, while checking the API’s request requirements and batching limits before designing a large indexing job.
What I like
- Support for more than 100 languages gives teams a documented multilingual option, though it is not a per-language quality guarantee.
- Selectable output dimensions—256, 512, 1,024, or 1,536—give you flexibility when balancing vector size with your index design.
- Text, image, and mixed inputs can fit retrieval systems that need to index visual material alongside text. The API also distinguishes search documents from search queries.
Limitations
- The API requires an
input_typefor v3-and-later models, so requests must label retrieval documents and queries correctly. - Each call accepts at most 96 inputs, which means larger indexing jobs need batching; regional availability details are not established by the cited model overview.
My take
The 128,000-token context length is useful when your input strategy depends on sending longer content, but it does not remove the need to design chunks and retrieval tests around your own data. I’d verify the results on representative languages and image-heavy documents rather than assuming broad modality or language support guarantees retrieval quality.
Best for
Consider embed-v4.0 if your agent retrieves across multiple languages or needs to include images in its indexed material, and you want a choice of vector dimensions. It is a less convenient fit if your indexing workflow cannot accommodate the required input labels or batches of up to 96 inputs.
Sources: Cohere’s Embed Models (Details and Application); Embed API (v2) | Cohere.
3. Google Gemini API — Gemini Embedding 2
Google Gemini API — Gemini Embedding 2Gemini Embedding 2 is worth considering if your agent pipeline can process an indexing backlog in batches rather than needing every embedding immediately. Google documents a Batch API option for workloads where latency is not a concern.
I would weigh that operational fit against a significant migration constraint: vectors from Gemini Embedding 2 cannot be directly compared with vectors from Gemini Embedding 001.
What I like
- The documented Batch API gives teams an option for higher-throughput embedding work when immediate results are not required.
- The migration guidance makes the incompatibility between the two Gemini embedding spaces explicit, which helps teams plan a model change.
Limitations
- Moving from Gemini Embedding 001 requires re-embedding indexed data; vectors from the old and new models cannot simply be mixed or compared.
- The supplied documentation does not establish language coverage, vector dimensions, or regional availability, so verify those requirements before choosing it.
My take
I would shortlist Gemini Embedding 2 for indexing workflows that can tolerate batch processing and are prepared to manage model changes deliberately. That can suit a knowledge base built in scheduled runs, but it is a weaker fit if you need low-latency embedding updates or expect to switch models without rebuilding your index.
Best for
Teams planning batch-oriented indexing who can re-embed their corpus when migrating from Gemini Embedding 001. Confirm the model's fit for your languages, dimensions, and deployment region before committing.
Sources: Embeddings | Gemini API — migration and batch guidance.
4. Voyage AI Embeddings API — Voyage 4 family
Voyage AI Embeddings API — Voyage 4 familyVoyage AI’s Voyage 4 family is worth considering when retrieval quality needs to work across languages and you want control over vector size. The three general-purpose models offer configurable dimensions and retrieval-specific query and document input modes, giving you options to test against your own corpus rather than locking into one vector format.
What I like
- The models are described as multilingual and have a 32,000-token context, which may suit indexing workflows with varied languages or longer inputs.
- You can choose 256, 512, 1,024, or 2,048 dimensions, making it possible to compare storage and retrieval trade-offs in your own system.
- The API distinguishes query from document inputs and supports float or, on supported models, quantized outputs.
Limitations
- The maximum aggregate token count per request varies by model, so check the limits for your selected model when batching.
- The API accepts up to 1,000 texts per call; larger indexing jobs need to be split across requests.
- Reduced dimensions and quantized outputs should be validated against your own retrieval data before adoption.
My take
I like the flexibility here: you can match dimensions and output format to your storage constraints, then evaluate retrieval quality rather than assuming the largest vectors are automatically the right choice. For retrieval, the documented query and document input modes also make the intended use explicit.
Best for
Consider Voyage 4 if multilingual retrieval, configurable vector dimensions, or quantized output matter to your pipeline. It fits teams comfortable integrating a hosted API through the Python client or REST endpoint; confirm request limits and validate any reduced-size representation on your indexed corpus.
Sources: Text Embeddings | Voyage AI — API integration.
5. Amazon Bedrock — Titan Text Embeddings v2
Amazon Bedrock — Titan Text Embeddings v2Amazon Titan Text Embeddings v2 is worth considering if your agent pipeline already runs on AWS and you want to choose the vector size to suit your retrieval store. It accepts long inputs and offers three output dimensions, giving you room to balance vector size against your indexing design.
I’d be cautious about choosing it for multilingual retrieval, though: AWS describes the model as optimized for English and warns that cross-language queries may be suboptimal.
What I like
- Three vector sizes—1,024, 512, or 256 dimensions—let you select an output size that fits your retrieval workflow.
- The documented input limit of 8,192 tokens or 50,000 characters can accommodate substantial text in a single request.
- On-demand and provisioned-throughput inference give AWS users two documented ways to access the model.
Limitations
- English is the optimization language; multilingual support is in preview, and cross-language retrieval may be suboptimal.
- The model is accessed through Amazon Bedrock, so using it depends on AWS service access and configuration.
My take
The adjustable dimensions are useful when you need to align embedding output with your vector store or control how large indexed vectors are. Pick a size deliberately and keep it consistent across documents and queries in the same retrieval space.
The main boundary is language fit, not input length. I’d shortlist Titan for an AWS-based, primarily English corpus, but compare alternatives if your agent must retrieve across languages.
Bedrock’s on-demand and provisioned-throughput options suit different inference setups, though the supplied documentation does not establish which is more cost-effective for a particular workload.
Best for
AWS-based agent pipelines indexing primarily English text, especially when the team wants to choose among three vector dimensions. Consider another option if cross-language retrieval is central to the use case.
Sources: Amazon Titan Text Embeddings models - Amazon Bedrock.
How to choose
How to Choose the Right Embedding API
Start with your corpus: identify its languages, whether it includes images, and how much text you need to embed per request. Then compare vector dimensions, query/document input requirements, and fit with your cloud environment and vector database.
Run a small retrieval evaluation using representative documents and real agent queries before choosing. Measure whether relevant material surfaces, and check the storage and indexing trade-offs; a larger vector is not automatically a better fit.
Common Mistakes to Avoid
Don’t assume broad language support guarantees good results for your specific languages, or overlook request limits when planning batch indexing. Treat model changes as an index migration: Google documents that Gemini Embedding 001 and Gemini Embedding 2 vectors are incompatible, so moving between them requires re-embedding.
Frequently Asked Questions
Can I choose vector dimensions independently of my vector database? Check the database’s supported vector size first, then select a compatible model output and keep it consistent for indexed documents and queries.
Final Verdict — Which One Would I Choose?
I’d choose based on the pipeline, not a universal ranking: prioritize Cohere or Voyage when multilingual retrieval is central, consider Cohere for image-inclusive inputs, and look at Titan for an AWS-based, primarily English workflow. For any finalist, validate retrieval quality on your own corpus before migrating or scaling indexing.
Sources: Vector embeddings | OpenAI API; Create embeddings | OpenAI API Reference; Cohere’s Embed Models (Details and Application); Embed API (v2) | Cohere; Embeddings | Gemini API — migration and batch guidance; Text Embeddings | Voyage AI — API integration; Amazon Titan Text Embeddings models - Amazon Bedrock.
Which option fits?
I’d choose based on the shape of the retrieval problem, not a universal ranking. For multilingual or image-inclusive collections, Cohere has documented support for over 100 languages and mixed text/image inputs; Voyage is another option to examine for multilingual retrieval and configurable output formats.
If your pipeline is already AWS-based and primarily English, Titan may be a closer fit, with its cross-language limitations in mind.
For a batch-oriented indexing workflow, Gemini Embedding 2 may be worth evaluating, but account for the re-embedding required when moving from Gemini Embedding 001. Whichever option makes your shortlist, first check compatibility with your vector store, then test retrieval using representative documents and real agent queries before scaling or migrating your index.