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

<Tabs>
  <Tab title="NodeJS">
    ```sh theme={"system"}
    npm install openai --save
    ```
  </Tab>

  <Tab title="Python">
    ```sh theme={"system"}
    pip install openai
    ```
  </Tab>
</Tabs>

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

<Tabs>
  <Tab title="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
        }
    )
    ```
  </Tab>

  <Tab title="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
      },
    });
    ```
  </Tab>
</Tabs>

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

<Tabs>
  <Tab title="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'
    ```
  </Tab>

  <Tab title="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();
    ```
  </Tab>

  <Tab title="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)
    ```
  </Tab>
</Tabs>


## Related topics

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