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

The Prisma AIRS AI Gateway provides a proxy to Qdrant - you can log your Qdrant requests and manage auth for Qdrant clusters on the AI Gateway.

## Using Qdrant with the AI Gateway

The AI Gateway provides a consistent API to interact with models from various providers. To integrate Qdrant with the AI Gateway:

### 1. Install the OpenAI SDK

Add the OpenAI SDK to your application to interact with Qdrant through the AI Gateway.

**NodeJS**

```sh theme={"system"}
npm install openai --save
```

**Python**

```sh theme={"system"}
pip install openai
```

### 2. Create a New Integration

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

You will also need your AI Gateway API Key from [the AI Gateway's Dashboard](https://stratacloudmanager.paloaltonetworks.com/).

**OpenAI Python SDK**

```python theme={"system"}
from openai import OpenAI

client = OpenAI(
    api_key="PORTKEY_API_KEY",
    base_url="https://aigw.portkey.ai/v1",
    default_headers={
        "x-portkey-provider": "qdrant",
        "x-portkey-custom-host": "QDRANT_HOST",  # Replace with your Qdrant host
    }
)
```

**OpenAI Node SDK**

```js theme={"system"}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "PORTKEY_API_KEY",
  baseURL: "https://aigw.portkey.ai/v1",
  defaultHeaders: {
      "x-portkey-provider": "qdrant",
      "x-portkey-custom-host": "QDRANT_HOST",  // Replace with your Qdrant host
  },
});
```

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

**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 'Authorization: Bearer PORTKEY_API_KEY'
```

**OpenAI NodeJS**

```javascript theme={"system"}
import OpenAI from 'openai';

const gateway = new OpenAI({
  apiKey: "PORTKEY_API_KEY",
  baseURL: "https://aigw.portkey.ai/v1",
  defaultHeaders: {
      "x-portkey-provider": "@QDRANT_PROVIDER",
      "x-portkey-custom-host": "QDRANT_HOST",  // Replace with your Qdrant host
  }
});

async function makeRequest() {
    const response = await gateway.post(
      "https://xxxx-xxx-xxx-xx-xxxxxx.us-west-2-0.aws.cloud.qdrant.io",
      { /* Your request body here */ }
    );
    console.log(response);
}

makeRequest();
```

**OpenAI Python**

```python theme={"system"}
from openai import OpenAI

openai = OpenAI(
    api_key="PORTKEY_API_KEY",
    base_url="https://aigw.portkey.ai/v1",
    default_headers={
        "x-portkey-provider": "qdrant",
        "x-portkey-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)
```


## Related topics

- [Qdrant MCP server](https://docs.portkey.ai/docs/aigw/integrations/mcp-servers/qdrant-mcp-server.md)
- [MLflow Tracing](https://docs.portkey.ai/docs/aigw/integrations/tracing-providers/ml-flow.md)
- [Milvus](https://docs.portkey.ai/docs/aigw/integrations/vector-databases/milvus.md)
- [Overview](https://docs.portkey.ai/docs/aigw/integrations/overview.md)
- [Enterprise Gateway](https://docs.portkey.ai/docs/changelog/enterprise.md)


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