Merge pull request #2090 from qdrant/docs-inference-openrouter

Inference docs: add OpenRouter
This commit is contained in:
Daniel Boros
2026-01-26 15:16:39 +01:00
committed by GitHub
31 changed files with 668 additions and 2 deletions
@@ -9,7 +9,7 @@ aliases:
Inference is the process of using a machine learning model to create vector embeddings from text, images, or other data types. While you can create embeddings on the client side, you can also let Qdrant generate them while storing or querying data.
![Inference.](/docs/inference.png)
![Inference](/docs/inference.png)
There are several advantages to generating embeddings with Qdrant:
@@ -175,14 +175,17 @@ This flexibility allows you to develop and test your applications locally or in
## External Embedding Model Providers
Qdrant Cloud can act as a proxy for the APIs of three external embedding model providers:
Qdrant Cloud can act as a proxy for the APIs of external embedding model providers:
- OpenAI
- Cohere
- Jina AI
- OpenRouter
This enables you to access any of the embedding models provided by these providers through the Qdrant API.
![Inference with an external embedding model provider](/docs/inference-external-provider.png)
To use an external provider's embedding model, you need an API key from that provider. For example, to access OpenAI models, you need an OpenAI API key. Qdrant does not store or cache your API keys; they must be provided with each inference request.
When using an external embedding model, ensure that your collection has been configured for vectors with the correct dimensionality. Refer to the model's documentation for details on the output dimensions.
@@ -241,6 +244,20 @@ At query time, you can use the same model by prepending the model name with `jin
Note that, because Qdrant does not store or cache your Jina AI API key, you need to provide it with each inference request
### OpenRouter
OpenRouter is a platform that provides [several embedding models](https://openrouter.ai/models?fmt=cards&output_modalities=embeddings). To use one of the models provided by the [OpenRouter Embeddings API](https://openrouter.ai/docs/api/reference/embeddings), prepend the model name with `openrouter/`.
For example, to use the `mistralai/mistral-embed-2312` model when ingesting data, prepend the model name with `openrouter/` and provide your OpenRouter API key in the `options` object.
{{< code-snippet path="/documentation/headless/snippets/inference/openrouter-upsert/" >}}
At query time, you can use the same model by prepending the model name with `openrouter/` and providing your OpenRouter API key in the `options` object:
{{< code-snippet path="/documentation/headless/snippets/inference/openrouter-query/" >}}
Note that, because Qdrant does not store or cache your OpenRouter API key, you need to provide it with each inference request.
## Multiple Inference Operations
You can run multiple inference operations within a single request, even when models are hosted in different locations. This example generates three different named vectors for a single point: image embeddings using `jina-clip-v2` hosted by Jina AI, text embeddings using `all-minilm-l6-v2` hosted by Qdrant Cloud, and BM25 embeddings using the `bm25` model executed locally by the Qdrant cluster: