Supabase Vector

The Postgres Vector database and AI Toolkit

An open source Vector database for developing AI applications. Use pgvector to store, index, and access embeddings, and our AI toolkit to build AI applications with Hugging Face and OpenAI.

Postgres + pgvector

Use pgvector to store, query, and index your vector embeddings at scale in a Postgres instance.

OpenAi logo

OpenAI and More

Easily connect to any LLM or embeddings API, including Hugging Face, SageMaker and more.

Secure and Scalable

Supabase is SOC2 type 2 compliant, and comes with an advanced permissions system.

Deploy Globally

Choose from many globally-distributed data centres or self-host on your own cloud.

Leverage the tools you love

Diagram of Machine Learning tools that integrate with Supabase Vector

Simple yet
powerful APIs

Easy-to-use client libraries for managing and querying vector stores in Postgres.


docs = vx.create_collection(name="docs", dimension=3)

# add records to the collection
docs.upsert(
    vectors=[
        (
         "vec0",           # the vector's identifier
         [0.1, 0.2, 0.3],  # the vector. list or np.array
         {"year": 1973}    # associated  metadata
        ),
        (
         "vec1",
         [0.7, 0.8, 0.9],
         {"year": 2012}
        )
    ]
)
        

# get an existing collection
docs = vx.get_collection(name="docs")

# index the collection to be queried by cosine distance
docs.create_index(measure=vecs.IndexMeasure.cosine_distance)

# Available options for query measure are:
#
# vecs.IndexMeasure.cosine_distance
# vecs.IndexMeasure.l2_distance
# vecs.IndexMeasure.max_inner_product

# or use the default (cosine_distance)
docs.create_index()
      

# get an existing collection
docs = vx.get_collection(name="docs")

# Query vectors with optional Metadata Filtering
docs.query(
    query_vector=[0.4,0.5,0.6],
    filters={"year": {"$eq": 2012}}, # metadata filters
)
      
Google Colaboratory logoOpen in Colab

Efficiently upsert millions of vectors with important metadata.

What you can build
with Supabase Vector?

Scale effortlessly from experimentation to production-ready AI applications.

Semantic Search

Search your own knowledge base by semantic similarity.

Chatbots

Enhance chatbot memory with content-based long-term retention.

Hybrid search

Combine semantic and full-text search with powerful SQL filtering.

Image Similarity

Transform images into image vector representations to detect similarity patterns.

Data Management

Automatically tag, deduplicate or detect patterns in your vector store.

Recommendations

Discover related content: articles, videos, restaurants, and more.

Powerful Features
Scale to millions

Develop, integrate, and deploy secure and enterprise-grade AI applications at unprecedented speed.

Fully managed or Self-Hosted

Start with our hassle-free cloud platform, or self-host to keep everything within your infrastructure. You choose.

Global & Multi-Region

Automatically provision and configure a fleet of applications across multiple regions to reduce read latency.

Integrated

Store vector embeddings in the same database as your transactional data, simplifying your applications and improving performance.

No Vendor Lock-In

Supabase uses open source tools to increase portability and avoid lock-in, making it easy to migrate in and out.

Automatic Backups

Protect your data using automatic backups with Point In Time Recovery to ensure it's always safe and recoverable.

Highly Scalable

Designed for unparalleled high performance and availability at global scale.

Supabase Vector for Enterprise

Talk to one of our experts about scaling Supabase Vector and managing embeddings at scale.

Pick your SupaPower(s)

Supabase products are built to work both in isolation and seamlessly together to ensure the most flexible and scalable developer experience.