NEWVectors or files. Pick a path.Start →

    Visual Product Search

    Enable camera-based product discovery for e-commerce. Customers snap a photo of a product they like, and the pipeline returns visually similar items from your catalog along with pricing, availability, and product metadata.

    image
    text
    Multi-Stage
    from mixpeek import Mixpeek
    client = Mixpeek(api_key="YOUR_API_KEY", namespace="product-search")
    # 1. A bucket for product photos with their catalog fields as object metadata, and a collection that embeds each photo
    bucket = client.buckets.create(
    bucket_name="products",
    bucket_schema={
    "properties": {
    "photo": {
    "type": "image",
    },
    },
    },
    )
    collection = client.collections.create(
    collection_name="product_catalog",
    source={"type": "bucket", "bucket_ids": [bucket["bucket_id"]]},
    feature_extractor={
    "feature_extractor_name": "multimodal_extractor",
    "version": "v1",
    },
    )
    # 2. Upload and process
    client.buckets.upload(
    bucket["bucket_id"],
    blobs=[{"property": "photo", "type": "image", "data": "s3://your-bucket/product-images/trail-runner.jpg"}],
    metadata={
    "name": "Trail runner",
    "price": 89,
    "in_stock": True,
    },
    )
    client.collections.trigger(collection["collection_id"])
    # 3. A customer photo searched against the product embeddings
    retriever = client.retrievers.create(
    retriever_name="product-search",
    collection_identifiers=["product_catalog"],
    input_schema={
    "photo": {
    "type": "image",
    "required": True,
    },
    },
    stages=[
    {
    "stage_name": "search",
    "stage_id": "feature_search",
    "parameters": {
    "searches": [
    {
    "feature_uri": "mixpeek://multimodal_extractor@v1/vertex_multimodal_embedding",
    "query": {
    "input_mode": "content",
    "value": "{{INPUT.photo}}",
    },
    "top_k": 50,
    },
    ],
    "final_top_k": 20,
    },
    },
    ],
    )
    # 4. Search
    results = client.retrievers.execute(
    retriever["retriever_id"],
    inputs={
    "photo": "https://example.com/customer-photo.jpg",
    },
    )
    for doc in results["documents"]:
    print(doc["document_id"], doc["score"])

    Feature Extractors

    Multimodal Extractor

    Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

    Retriever Stages

    feature search

    Search and filter documents by vector similarity using feature embeddings

    filter

    Related Recipes & Resources

    Explore these related resources to deepen your understanding and discover more powerful features