---
title: "Working with Twelve Labs in Pixeltable"
description: "Twelve Labs provides multimodal embeddings that project text, images, audio, and video into the same semantic space. This enables true cross-modal search - the most powerful feature of this integration."
url: "https://www.pixeltable.com/notebooks/working-with-twelvelabs"
updated: "2026-02-12"
---

# Working with Twelve Labs in Pixeltable

Twelve Labs provides multimodal embeddings that project text, images, audio, and video into the same semantic space. This enables true cross-modal search - the most powerful feature of this integration.

- **Type:** Notebook
- **Group:** Providers

## What it covers

- Cross-Modal Video Search
- Embedding Options
- Other Modalities: Text, Images, and Documents

## What it uses

- **Install:** `pip install pixeltable twelvelabs`
- **Environment variables it names:** `TWELVELABS_API_KEY`
- **Pixeltable calls:** `pxt.create_table()`, `pxt.create_view()`, `insert()`, `add_embedding_index()`, `similarity()`, `add_computed_column()`

## A look at the code

```python
# Create a view that segments the video into searchable chunks
# Twelve Labs requires minimum 4 second segments
video_chunks = pxt.create_view(
    'twelvelabs_demo/video_chunks',
    video_t,
    iterator=pxtf.video.video_splitter(
        video=video_t.video, duration=5.0, min_segment_duration=4.0
    ),
)

# Add embedding index for cross-modal search
video_chunks.add_embedding_index(
    'video_segment',
    embedding=pxtf.twelvelabs.embed.using(model_name='marengo3.0'),
)
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/providers/working-with-twelvelabs.ipynb
- **Docs page:** https://docs.pixeltable.com/howto/providers/working-with-twelvelabs
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/providers/working-with-twelvelabs.ipynb
