> This page is for version v1.3 (default).
> For other versions, use one of these documentation indexes:
> - v1.3 (default): https://docs.twelvelabs.io/v1.3/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.twelvelabs.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.twelvelabs.io/_mcp/server.

# Qdrant - Building a semantic video search workflow

> This integration combines the TwelveLabs Embed API with Qdrant Vector Search to create an efficient semantic video search solution.

![](/_fern-img/77e01af378f97526cb184a6919981f18dba544ca51aceba4d1478334c52e4c9c.webp)

**Summary**: This integration combines TwelveLabs' [Embed API](/docs/guides/create-embeddings) with [Qdrant Vector Search](https://qdrant.tech) to create an efficient semantic video search solution. It generates multimodal embeddings for video content, allowing for precise and relevant search results across various modalities.

**Description**: The process of performing semantic video searches using TwelveLabs and Qdrant involves the following main steps:

1. Generate multimodal embeddings for your video content.
2. Store these embeddings in Qdrant.
3. Create embeddings for your search queries. You can provide either text, audio, or images as queries.
4. Use these query embeddings to perform vector searches in Qdrant.

**Code explanation**: Our blog post, [Building a Semantic Video Search Workflow with TwelveLabs and Qdrant](https://www.twelvelabs.io/blog/twelve-labs-and-qdrant), guides you through the process of building a semantic video search workflow. This workflow is ideal for applications like video indexing, content recommendation systems, and contextual search engines.

**Colab Notebook**: [TwelveLabs-EmbedAPI-Qdrant](https://colab.research.google.com/drive/1_fYca9j1Tx52WkSRSt2IOwi_H4XKMmLS?usp=sharing)

# Integration with TwelveLabs

This section explains how to utilize the [TwelveLabs Python SDK](https://github.com/twelvelabs-io/twelvelabs-python) to create embeddings for semantic video search. The integration involves generating the following types of embeddings:

* Video embeddings derived from your video content
* Text, video, and audio embeddings for the queries

## Video embeddings

The following code generates an embedding for a video. It creates a video embedding task that processes the video and periodically checks the task's status to retrieve the embeddings upon completion.

**`Python`**

```python Python
# Step 1: Create an embedding task
task = twelvelabs_client.embed.task.create(
    model_name="Marengo-retrieval-2.7",  # Specify the model
    video_url="https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_2mb.mp4"  # Video URL
)

# Step 2: Wait for the task to complete
task.wait_for_done(sleep_interval=3)  # Check every 3 seconds

# Step 3: Retrieve the embeddings
task_result = twelvelabs_client.embed.task.retrieve(task.id)

# Display the embedding results
print("Embedding Vector (First 10 Dimensions):", task_result.embeddings[:10])
print("Embedding Dimensionality:", len(task_result.embeddings))
```

For details on creating text embeddings, see the [Video embeddings](/docs/guides/create-embeddings/at-scale/video) page.

## Text embeddings

The code below generates a text embedding and identifies the video segments that match your text semantically.

**`Python`**

```python Python
# Generate text embedding
text_segment = twelvelabs_client.embed.create(
    model_name="Marengo-retrieval-2.7",
    text="A white rabbit",  # Input query
).text_embedding.segments[0]

# Perform semantic search in Qdrant
text_results = qdrant_client.query_points(
    collection_name=collection_name,
    query=text_segment.embeddings_float,  # Use the embedding vector
)

print("Text Query Results:", text_results)
```

For details on creating text embeddings, see the [Embed a query](/docs/guides/create-embeddings/query) page.

## Audio embeddings

The code below generates an audio embedding and finds the video segments that match the semantic content of your audio clip.

**`Python`**

```python Python
# Generate audio embedding
audio_segment = twelvelabs_client.embed.create(
    model_name="Marengo-retrieval-2.7",
    audio_url="https://codeskulptor-demos.commondatastorage.googleapis.com/descent/background%20music.mp3",  # Audio file URL
).audio_embedding.segments[0]

# Perform semantic search in Qdrant
audio_results = qdrant_client.query_points(
    collection_name=collection_name,
    query=audio_segment.embeddings_float,  # Use the embedding vector
)

print("Audio Query Results:", audio_results)
```

For details on creating text embeddings, see the [Audio embeddings](/docs/guides/create-embeddings/at-scale/audio) page.

## Image embeddings

The code below generates an image embedding and identifies video segments that are semantically similar to the image.

**`Python`**

```python Python
# Generate image embedding
image_segment = twelvelabs_client.embed.create(
    model_name="Marengo-retrieval-2.7",
    image_url="https://gratisography.com/wp-content/uploads/2024/01/gratisography-cyber-kitty-1170x780.jpg",  # Image URL
).image_embedding.segments[0]

# Perform semantic search in Qdrant
image_results = qdrant_client.query_points(
    collection_name=collection_name,
    query=image_segment.embeddings_float,  # Use the embedding vector
)

print("Image Query Results:", image_results)
```

For details on creating image embeddings, see the [Embed a query](/docs/guides/create-embeddings/query) page.

# Next steps

After reading this page, you have the following options:

* **Customize and use the example**: Use the [TwelveLabs-EmbedAPI-Qdrant](https://colab.research.google.com/drive/1_fYca9j1Tx52WkSRSt2IOwi_H4XKMmLS?usp=sharing) notebook to understand how the integration works. You can make changes and add functionalities to suit your specific use case.
* **Explore further**: Try the [applications built by the community](/docs/resources/from-the-community) or our [sample applications](/docs/resources/sample-applications) to get more insights into the TwelveLabs Video Understanding Platform's diverse capabilities and learn more about integrating the platform into your applications.