mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-07 03:48:30 +02:00
Merge pull request #2090 from qdrant/docs-inference-openrouter
Inference docs: add OpenRouter
This commit is contained in:
@@ -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.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user