> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Vector Store

> Use Mixpeek as a standalone vector database — bring your own embeddings, search instantly, promote to managed when ready

Bring your own embeddings, upsert them directly, and query with dense, sparse, BM25, or hybrid search. No collections or extractors required.

## Quickstart

<Steps>
  <Step title="Create a namespace">
    No schema needed — MVS infers vector dimensions on first write.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.mixpeek.com/v1/namespaces/standalone" \
        -H "Authorization: Bearer $MIXPEEK_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"namespace_id": "product-search"}'
      ```

      ```python Python theme={null}
      from mixpeek import Mixpeek

      client = Mixpeek(api_key="mxp_sk_...")

      client.namespaces.create(
          namespace_id="product-search",
          mode="standalone",
      )
      ```
    </CodeGroup>

    You can optionally pre-declare vector configs if you want to set a specific distance metric:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.mixpeek.com/v1/namespaces/standalone" \
        -H "Authorization: Bearer $MIXPEEK_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "namespace_id": "product-search",
          "vector_configs": [
            {"name": "text_embedding", "dimension": 1536, "metric": "dot"}
          ]
        }'
      ```

      ```python Python theme={null}
      client.namespaces.create(
          namespace_id="product-search",
          mode="standalone",
          vector_configs=[
              {"name": "text_embedding", "dimension": 1536, "metric": "dot"}
          ],
      )
      ```
    </CodeGroup>
  </Step>

  <Step title="Upsert documents with your vectors">
    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.mixpeek.com/v1/namespaces/product-search/documents/upsert" \
        -H "Authorization: Bearer $MIXPEEK_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "documents": [{
            "document_id": "prod-001",
            "vectors": {"text_embedding": [0.12, -0.34, 0.56, "...1536 floats"]},
            "payload": {"title": "Wireless Headphones", "category": "audio", "price": 79.99}
          }]
        }'
      ```

      ```python Python theme={null}
      client.namespaces.documents.upsert(
          namespace_id="product-search",
          documents=[{
              "document_id": "prod-001",
              "vectors": {"text_embedding": [0.12, -0.34, 0.56]},  # 1536 floats
              "payload": {"title": "Wireless Headphones", "category": "audio", "price": 79.99},
          }],
      )
      ```
    </CodeGroup>
  </Step>

  <Step title="Create a retriever (one-time)">
    Querying is unified on **retrievers** — one query concept whether you bring your own vectors or promote to managed embedding. Create a retriever once; for a standalone namespace it takes the query vector you computed (`input_mode: vector`). All requests are scoped to the namespace via the `X-Namespace` header.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.mixpeek.com/v1/retrievers" \
        -H "Authorization: Bearer $MIXPEEK_API_KEY" \
        -H "X-Namespace: product-search" \
        -H "Content-Type: application/json" \
        -d '{
          "retriever_name": "product_search",
          "input_schema": {"query_vector": {"type": "array", "required": true}},
          "stages": [{
            "stage_name": "search",
            "stage_type": "filter",
            "config": {
              "stage_id": "feature_search",
              "parameters": {
                "searches": [{
                  "feature_uri": "text_embedding",
                  "query": {"input_mode": "vector", "value": "{{INPUT.query_vector}}"},
                  "filters": {"must": [{"key": "category", "match": {"value": "audio"}}]},
                  "top_k": 10
                }],
                "final_top_k": 10
              }
            }
          }]
        }'
      ```

      ```python Python theme={null}
      retriever = client.retrievers.create(
          namespace_id="product-search",
          retriever_name="product_search",
          input_schema={"query_vector": {"type": "array", "required": True}},
          stages=[{
              "stage_name": "search",
              "stage_type": "filter",
              "config": {
                  "stage_id": "feature_search",
                  "parameters": {
                      "searches": [{
                          "feature_uri": "text_embedding",
                          "query": {"input_mode": "vector", "value": "{{INPUT.query_vector}}"},
                          "filters": {"must": [{"key": "category", "match": {"value": "audio"}}]},
                          "top_k": 10,
                      }],
                      "final_top_k": 10,
                  },
              },
          }],
      )
      ```
    </CodeGroup>
  </Step>

  <Step title="Execute the retriever">
    Run the retriever with your query embedding. Each hit exposes `document_id` and payload fields.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.mixpeek.com/v1/retrievers/{retriever_id}/execute" \
        -H "Authorization: Bearer $MIXPEEK_API_KEY" \
        -H "X-Namespace: product-search" \
        -H "Content-Type: application/json" \
        -d '{
          "inputs": {"query_vector": [0.15, -0.28, 0.44, "...query embedding"]}
        }'
      ```

      ```python Python theme={null}
      results = client.retrievers.execute(
          namespace_id="product-search",
          retriever_id=retriever.retriever_id,
          inputs={"query_vector": [0.15, -0.28, 0.44]},  # query embedding
      )
      ```
    </CodeGroup>
  </Step>
</Steps>

## Architecture

<Frame>
  <img src="https://mintcdn.com/mixpeek/PRYIJzrWYd-bekCW/assets/vector-store/standalone-architecture.svg?fit=max&auto=format&n=PRYIJzrWYd-bekCW&q=85&s=c0d82555dad0a11f73a11debdb4ccc5d" alt="Standalone vector store architecture — your pipeline feeds vectors into Mixpeek's sharded storage with dense, BM25, and payload indexes" width="800" height="340" data-path="assets/vector-store/standalone-architecture.svg" />
</Frame>

## Scaling

The index **auto-partitions as you grow** — there's no capacity planning, resharding, or replica provisioning on your side, and no per-vector or per-namespace caps. The same namespace serves thousands or hundreds of millions of vectors.

At large scale (10M–100M+ vectors), two things matter:

* **Tiering.** Hot (in-memory) vectors serve at \~10ms; cold (object-storage) vectors serve at \~100ms via brute-force scan. The vector store keeps your actively-queried set resident automatically — there's no manual tier management on your side.
* **Shard visibility.** The `shards.hot` / `shards.cold` counts in [namespace usage metrics](/vector-store/namespaces) show how the index has partitioned. Dedicated/enterprise deployments can tune shard and index parameters — see [Single-Tenant](/resources/single-tenant).

<Note>
  Need concrete latency/recall targets for a specific corpus size and query rate? [Talk to engineers](https://mixpeek.com/contact) — sizing depends on dimensions, filter selectivity, and your hot/cold split.
</Note>

## Standalone vs Managed

Every namespace runs in one of two modes. Start standalone and [promote](/vector-store/promote) when you're ready — no reindexing.

|                       | Standalone                                    | Managed                                    |
| --------------------- | --------------------------------------------- | ------------------------------------------ |
| **Query latency**     | Lower — no embedding at query time            | +50-200ms for auto-embedding               |
| **Embedding cost**    | You pay your provider directly                | Included in platform pricing               |
| **Model flexibility** | Any model, any fine-tune                      | Bound to registered inference services     |
| **Write path**        | Direct upsert only                            | Collections auto-process + direct upsert   |
| **Search input**      | Pre-computed vectors, text (BM25), sparse     | Also accepts raw text/URLs (auto-embedded) |
| **Best for**          | Existing ML infra, low-latency, custom models | End-to-end processing, file pipelines      |

<Tip>
  Start standalone if you already have embeddings. Promotion is additive — all existing data is preserved.
</Tip>

## Features

All features work identically in standalone and managed modes.

| Capability              | Description                                                                                                            |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Dense search**        | Vector similarity with cosine, dot product, or euclidean distance                                                      |
| **Sparse search**       | Sparse vector queries for learned sparse representations (SPLADE, etc.)                                                |
| **BM25 keyword search** | Full-text search on payload fields via [text indexes](/vector-store/namespaces#text-indexes-bm25)                      |
| **Hybrid search**       | Combine dense + BM25 + sparse in one query with [RRF or DBSF fusion](/vector-store/documents#hybrid)                   |
| **Metadata filtering**  | Filter on any payload field — combine with any search type                                                             |
| **Payload indexes**     | Manual or [adaptive](/vector-store/namespaces#adaptive-payload-indexes) — auto-created based on query patterns         |
| **Schema-on-write**     | [Auto-create vector indexes](/vector-store/namespaces#schema-on-write) on first upsert — no upfront declaration needed |
| **Usage metrics**       | [Per-namespace breakdowns](/vector-store/namespaces#usage-metrics) of vectors, queries, and writes                     |
| **Namespace cloning**   | Clone namespaces for testing or environment branching                                                                  |

## Billing

MVS pricing is **pure usage-based** — no per-vector caps, no namespace limits. Tiers gate support level, not features.

| Resource      | Price                |
| ------------- | -------------------- |
| **Storage**   | \$0.023 / GB / month |
| **Hot cache** | \$25 / GB / month    |
| **Queries**   | \$1 / 1M queries     |
| **Writes**    | \$1 / 1M writes      |

Your first **1M vectors are free** on the Starter tier.

| Tier           | Minimum                                | Support                 |
| -------------- | -------------------------------------- | ----------------------- |
| **Starter**    | \$0/mo                                 | Community               |
| **Growth**     | \$50/mo (usage applies toward minimum) | Email + SLA             |
| **Enterprise** | Custom                                 | Dedicated + SSO + HIPAA |

All search features (dense, sparse, BM25, hybrid, adaptive indexes) are available on every tier. See the [pricing calculator](https://mixpeek.com/mvs#pricing) for cost estimates at scale.

Track usage programmatically with the [vector-backend usage endpoint](/api-reference/organization-billing/get-vector-backend-usage) (`GET /v1/organizations/billing/usage/vector-backend`) or view it in the Studio dashboard under **Billing**.

## Next Steps

<CardGroup cols={3}>
  <Card title="Namespaces" icon="database" href="/vector-store/namespaces">
    Vector indexes, metrics, BM25
  </Card>

  <Card title="Documents & Search" icon="magnifying-glass" href="/vector-store/documents">
    Upsert, query, manage
  </Card>

  <Card title="Promote" icon="arrow-up" href="/vector-store/promote">
    Standalone → managed
  </Card>
</CardGroup>

***

<Note>
  **Ready to go beyond BYO vectors?** Promote your standalone namespace to **managed mode** and unlock automatic embedding, file processing pipelines, and enrichment — without reindexing. Your retrievers keep working unchanged — after promotion, the same retriever can auto-embed raw text instead of taking a pre-computed vector. [See the migration guide](/vector-store/promote#querying-with-retrievers) for details. [Learn how to promote →](/vector-store/promote)
</Note>
