---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

1.  [](/)
2.  [Code examples](/recipes)
3.  Multimodal Search with MVS

Back to code examples

SimilarCross-Media

# Multimodal Search with MVS

Build multimodal search by embedding different content types (text, images, video frames) with your own models and searching across them in a single MVS namespace. Use CLIP or any multimodal embedding model for cross-modal retrieval.

text

image

video

Multi-Tier

[Run in Builder](/build?recipe=mvs-multimodal-search)

"dog playing outdoors"

### Why This Matters

Multimodal search without a managed pipeline. Use your preferred CLIP, SigLIP, or any embedding model to embed text, images, and video into a shared vector space, then search across all of them with MVS.

Python

cURL

from mixpeek import Mixpeek

client \= Mixpeek(api\_key\="YOUR\_API\_KEY")

NAMESPACE \= "multimodal-search"

\# --- local embedding model (runs on your machine; any CLIP-compatible model works) ---

import open\_clip

import torch

from PIL import Image

model, \_, preprocess \= open\_clip.create\_model\_and\_transforms("ViT-B-32", pretrained\="laion2b\_s34b\_b79k")

tokenizer \= open\_clip.get\_tokenizer("ViT-B-32")

def embed\_text(text):

    with torch.no\_grad():

        features \= model.encode\_text(tokenizer(\[text\]))

    return (features / features.norm(dim\=\-1, keepdim\=True))\[0\].tolist()

def embed\_image(path):

    with torch.no\_grad():

        features \= model.encode\_image(preprocess(Image.open(path)).unsqueeze(0))

    return (features / features.norm(dim\=\-1, keepdim\=True))\[0\].tolist()

\# --- end local embedding model ---

\# 1. A standalone namespace for 512-number CLIP vectors

client.namespaces.create(

    namespace\_id\=NAMESPACE,

    mode\="standalone",

    vector\_configs\=\[{"name": "clip", "dimension": 512, "metric": "cosine"}\],

)

\# 2. Text and images share the space, so both go in as the same vector name

texts \= \["A golden retriever playing fetch in the park", "Sunset over the ocean with sailboats"\]

images \= \["dog\_park.jpg", "sunset.jpg"\]

client.namespaces.documents.upsert(

    namespace\_id\=NAMESPACE,

    documents\=\[

        {"document\_id": f"text-{i}", "vectors": {"clip": embed\_text(t)}, "payload": {"modality": "text", "content": t}}

        for i, t in enumerate(texts)

    \]

    + \[

        {"document\_id": f"image-{i}", "vectors": {"clip": embed\_image(p)}, "payload": {"modality": "image", "file": p}}

        for i, p in enumerate(images)

    \],

)

\# 3. A retriever over the CLIP vector

retriever \= client.retrievers.create(

    retriever\_name\="clip-search",

    input\_schema\={"qv": {"type": "array", "required": True}},

    stages\=\[

        {

            "stage\_name": "search",

            "stage\_id": "feature\_search",

            "parameters": {

                "searches": \[

                    {

                        "feature\_uri": "clip",

                        "query": {"input\_mode": "vector", "value": "{{INPUT.qv}}"},

                        "top\_k": 10,

                    },

                \],

                "final\_top\_k": 10,

            },

        },

    \],

)

\# A text query finds images and text alike

query \= embed\_text("dog playing outdoors")

results \= client.retrievers.execute(retriever\["retriever\_id"\], inputs\={"qv": query})

for doc in results\["documents"\]:

    print(round(doc\["score"\], 3), doc.get("modality"), doc.get("content") or doc.get("file"))

\# The same query, filtered to images

images\_only \= client.retrievers.execute(

    retriever\["retriever\_id"\],

    inputs\={"qv": query},

    filters\={"AND": \[{"field": "modality", "operator": "eq", "value": "image"}\]},

)

print(len(images\_only\["documents"\]), "image results")

### Feature Extractors

### Retriever Stages

feature search

Search and filter documents by vector similarity using feature embeddings

filter

### Documentation

[MVS Overview](https://mixpeek.com/docs/vector-store/overview)[Cross-Modal Search](https://mixpeek.com/docs/vector-store/overview)[Metadata Filtering](https://mixpeek.com/docs/retrieval/filters)

## Related code examples and resources

Pages on the same stages, extractors and patterns.

[

Recipe

### Multimodal Hybrid Search Pipeline

Combine vector search with keyword search (BM25) across text, images, and video for the most comprehensive multimodal retrieval system.

Learn more





](/recipes/multimodal-hybrid-search)[

Recipe

### Document Intelligence Search

Extract and search through PDFs, presentations, and documents. Combines OCR, layout analysis, and semantic search for comprehensive document retrieval.

Learn more





](/recipes/document-search-pipeline)[

Recipe

### BYO Embeddings Vector Search

Bring pre-computed embeddings from any provider (OpenAI, Cohere, Together, etc.) and upsert them directly into MVS for instant vector search. No feature extractors, no pipelines -- just embeddings in, results out.

Learn more





](/recipes/mvs-byo-embeddings-search)[

Recipe

### RAG with MVS Standalone

Complete RAG pipeline using MVS for retrieval and OpenAI for generation. Chunk your documents, embed them with any provider, store in MVS, retrieve relevant context, and generate answers -- no managed feature extractors needed.

Learn more





](/recipes/mvs-rag-pipeline)[

Recipe

### Multimodal RAG Pipeline

Build a retrieval-augmented generation system that works with text, images, and video. Feed relevant multimodal context to LLMs for grounded responses.

Learn more





](/recipes/multimodal-rag-pipeline)[

Recipe

### Taxonomy Enrichment Pipeline

Automatically classify and tag content using custom taxonomies. Map your content to IAB categories, custom hierarchies, or industry-specific classifications.

Learn more





](/recipes/taxonomy-enrichment-pipeline)