> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Qdrant

[Qdrant](https://qdrant.tech/) is an open-source vector similarity search engine built for production-ready vector search applications.
It provides a convenient API to store, search, and manage vectors with additional payload data.

Portkey provides a proxy to Qdrant - you can log your Qdrant requests and manage auth for Qdrant clusters on Portkey.

## Portkey SDK Integration with Qdrant

Portkey provides a consistent API to interact with models from various providers. To integrate Qdrant with Portkey:

### 1. Install the Portkey SDK

Add the Portkey SDK to your application to interact with Qdrant through Portkey's gateway.

> [tab] NodeJS
>
> ```sh theme={"system"}
> npm install --save portkey-ai
> ```

> [tab] Python
>
> ```sh theme={"system"}
> pip install portkey-ai
> ```

### 2. Create a New Integration

To use Qdrant with Portkey, get your API key from [Qdrant App](https://cloud.qdrant.io/), then add it to Portkey to create Qdrant integration.

You will also need your Portkey API Key from [Portkey's Dashboard](https://app.portkey.ai).

> [tab] NodeJS SDK
>
> ```js theme={"system"}
> import Portkey from 'portkey-ai'
>
> const portkey = new Portkey({
>     apiKey: "PORTKEY_API_KEY", // defaults to process.env["PORTKEY_API_KEY"]
>     provider:"@PROVIDER" // Your Qdrant provider slug
> })
> ```

> [tab] Python SDK
>
> ```python theme={"system"}
> from portkey_ai import Portkey
>
> portkey = Portkey(
>     api_key="PORTKEY_API_KEY",  # Replace with your Portkey API key
>     provider="@PROVIDER"   # Replace with your provider slug for Qdrant
> )
> ```

> [tab] OpenAI Python SDK
>
> ```python theme={"system"}
> from openai import OpenAI
>
> from portkey_ai import PORTKEY_GATEWAY_URL, createHeaders
>
> client = OpenAI(
>     api_key="QDRANT_API_KEY",
>     base_url=PORTKEY_GATEWAY_URL,
>     default_headers=createHeaders(
>         api_key="PORTKEY_API_KEY",
>         provider="qdrant",
>         custom_host="QDRANT_HOST" # Replace with your Qdrant host
>     )
> )
> ```

> [tab] OpenAI Node SDK
>
> ```js theme={"system"}
> import OpenAI from "openai";
>
> import { PORTKEY_GATEWAY_URL, createHeaders } from "portkey-ai";
>
> const client = new OpenAI({
>   apiKey: "QDRANT_API_KEY",
>   baseURL: PORTKEY_GATEWAY_URL,
>   defaultHeaders: createHeaders({
>     provider: "qdrant",
>     apiKey: "PORTKEY_API_KEY",
>     customHost: "QDRANT_HOST" // Replace with your Qdrant host
>   }),
> });
> ```

### 3. Use the Portkey SDK to interact with Qdrant

> [tab] Python
>
> ```python theme={"system"}
> from portkey_ai import Portkey
>
> portkey = Portkey(
>     api_key="PORTKEY_API_KEY",  # Replace with your Portkey API key
>     provider="@QDRANT_PROVIDER",
>     custom_host="QDRANT_HOST" # Replace with your Qdrant host
> )
>
> response = portkey.post(
>     url="https://xxxx-xxx-xxx-xx-xxxxxx.us-west-2-0.aws.cloud.qdrant.io", # Qdrant search endpoint, you can use any Qdrant endpoint
> )
>
> print(response)
> ```

> [tab] NodeJS
>
> ```javascript theme={"system"}
> import Portkey from 'portkey-ai';
>
> const portkey = new Portkey({
>   apiKey: "PORTKEY_API_KEY", // Replace with your Portkey API key
>   provider:"@QDRANT_PROVIDER", // Add your Qdrant provider slug
>   customHost: "QDRANT_HOST" // Replace with your Qdrant host
> });
>
> async function makeRequest() {
>     const response = await portkey.post(
>       "https://xxxx-xxx-xxx-xx-xxxxxx.us-west-2-0.aws.cloud.qdrant.io",
>       { /* Your request body here */ }
>     );
>     console.log(response);
> }
>
> makeRequest();
> ```

> [tab] OpenAI NodeJS
>
> ```javascript theme={"system"}
> import OpenAI from 'openai';
> import { PORTKEY_GATEWAY_URL, createHeaders } from 'portkey-ai'
>
> const portkey = new OpenAI({
>   apiKey: 'QDRANT_API_KEY',
>   baseURL: PORTKEY_GATEWAY_URL,
>   defaultHeaders: createHeaders({
>     provider:"@QDRANT_PROVIDER",
>     apiKey: "PORTKEY_API_KEY",
>     customHost: "QDRANT_HOST" // Replace with your Qdrant host
>   })
> });
>
> async function makeRequest() {
>     const response = await portkey.post(
>       "https://xxxx-xxx-xxx-xx-xxxxxx.us-west-2-0.aws.cloud.qdrant.io",
>       { /* Your request body here */ }
>     );
>     console.log(response);
> }
>
> makeRequest();
> ```

> [tab] OpenAI Python
>
> ```python theme={"system"}
> from openai import OpenAI
> from portkey_ai import PORTKEY_GATEWAY_URL, createHeaders
>
> openai = OpenAI(
>     api_key='QDRANT_API_KEY',
>     base_url=PORTKEY_GATEWAY_URL,
>     default_headers=createHeaders(
>         provider="qdrant",
>         api_key="PORTKEY_API_KEY",
>         custom_host="QDRANT_HOST" # Replace with your Qdrant host
>     )
> )
>
> response = openai.post(
>     url="https://xxxx-xxx-xxx-xx-xxxxxx.us-west-2-0.aws.cloud.qdrant.io", # Qdrant search endpoint, You can use any Qdrant endpoint
> )
>
> print(response)
> ```

> [tab] cURL
>
> ```sh theme={"system"}
> curl --location --request POST 'https://xxxx-xxx-xxx-xx-xxxxxx.us-west-2-0.aws.cloud.qdrant.io' \
> --header 'x-portkey-custom-host: QDRANT_HOST' \
> --header 'x-portkey-provider: QDRANT_PROVIDER' \
> --header 'x-portkey-api-key: PORTKEY_API_KEY'
> ```

***

> [card] [Portkey is now PRISMA AIRS AI Gateway. See it in action.](https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\&utm_medium=referral\&utm_campaign=prisma_airs\&utm_content=docs_nav#contact)
>
> Contact Us


## Related topics

- [Qdrant MCP server](https://docs.portkey.ai/docs/integrations/mcp-servers/qdrant-mcp-server.md)
- [January](https://docs.portkey.ai/docs/changelog/2025/jan.md)
- [MLflow Tracing](https://docs.portkey.ai/docs/integrations/tracing-providers/ml-flow.md)
- [December](https://docs.portkey.ai/docs/changelog/2024/dec.md)
- [Milvus](https://docs.portkey.ai/docs/integrations/vector-databases/milvus.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.