Skip to main content
Search embeddings you computed yourself, with no extractors or collections to set up: create a standalone namespace, upsert documents with their vectors and payload, and query them through a retriever. When you later want Mixpeek to embed queries or process files, promote the namespace to managed without reindexing.

Prerequisites

  • A Mixpeek API key with an active plan. Until a plan is chosen, calls return PlanRequiredError.
  • Your embeddings, and the model that produced them, so query vectors come from the same model.

Upsert and search your vectors

1

Create a standalone namespace

Create the namespace
namespace_id is the id you choose: 1 to 128 letters, digits, _ and -, starting with a letter or digit. vector_configs is optional. Without it, the first upsert under a vector name creates that index with the dimension it sees and the cosine metric, and later writes must match that dimension. Set metric to dot or euclidean up front if your model needs it. Use dimension 1536, 768 or whatever your model outputs; the examples use 3 so they run as shown.
2

Upsert documents

Each call takes up to 1,000 documents; repeat it for larger loads. An existing document_id is overwritten, vectors and payload together. A document can carry vectors for any subset of indexes, and a new vector name creates a new index.
3

Create a retriever

All queries run through retrievers; there is no endpoint that searches a namespace directly. For your own vectors, the feature_search stage takes input_mode: vector and the vector name as feature_uri.
One-stage vector search
The response carries retriever_id.
4

Execute it

Search with a query vector

Check that it worked

The execute response carries documents, each with document_id, score and your payload fields, plus status and warnings. A run that degraded answers 200 with status: "degraded". GET /v1/namespaces/product-search/documents/prod-001 reads one document back. Upserts become searchable in the background, usually within 10 to 30 seconds. For read-your-writes, send "options": {"write_token": true} on the upsert and pass the returned write_token to execute. Upserts invalidate the execute cache, so a re-run after a write returns fresh results.

Search options

Stage parameters are in Stages.
Name vectors after your project or model, such as my_text_v1. A few short generic names, text_embedding among them, collide with legacy keys in the store: writes succeed and every search then fails with 409.

What a document carries

Mixpeek writes its own fields under _internal. To keep a source system’s collection id, store it under another key such as source_collection_id.
A document defaults to source_type: "direct_upsert" with no lineage. Send lineage to import derived documents that know where they came from:
POST /v1/collections/{collection_id}/documents takes vectors keyed by the collection’s index name. Read names from vector_indexes on GET /v1/collections/{collection_id}: use the last segment of feature_uri (multilingual_e5_large_instruct_v1) or the full index.name (text_extractor_v1_embedding). Both work, and the vector is stored under index.name. The array length must match the index dimensions. A key the collection does not have returns a 422 that lists the available index names and dimensions.
cURL

Import an export from another system

To load another system’s export into a collection with vectors and lineage intact, use three calls; the first two write nothing. Run step 3 with "dry_run": true first: it checks every row and writes nothing (imported is 0). A bad row does not stop the batch, so compare reconstructed with imported and skipped rather than looking for an error status. explode with explode_axis splits one export row into several documents. Import submits no extraction, so a collection with an extractor stores the export’s vectors as they are. Moving a whole index from Pinecone or another database is covered in Migrate from another database.

Read, update and delete documents

The calls without a namespace in the path read it from X-Namespace. A top-level key in a PATCH body updates the document’s top-level field (such as a passthrough brand_id); a key inside metadata updates metadata.<key>. Deletes cascade. Deleting a bucket object removes every document derived from it; deleting a collection removes its documents; deleting a namespace removes everything in it. Deleting only a document leaves its source object, so a reprocess recreates it. A namespace under a hold refuses every delete. Stored media fields hold gs:// or s3:// URIs. batch-get returns signed https:// URLs by default; documents/list, single-document GET and retriever execute return them when you send return_presigned_urls: true in the body. Signed URLs last 24 hours, or 1 hour from single-document GET.

Set and remove metadata keys

PUT and PATCH treat metadata the same way. Each key you send is set, and keys you omit stay as they are. A key set to null is removed. "metadata": null returns a 422, so name each key you want to remove.
cURL
This sets metadata.status, removes metadata.stale_field and leaves every other key alone.
Object metadata vs document metadata are separate. The calls above edit a document. To edit the source object in its bucket, use PATCH /v1/buckets/{bucket_id}/objects/{object_id} and send the object’s custom fields flat at the root of the body, for example {"campaign_id": "camp_002"}. Only the fields you send change. Editing one does not change the other, and reprocessing an object regenerates its documents from the object’s current state.

Promote to managed

Promotion maps your existing indexes to inference services so retrievers can take raw text, and lets you add collections with extractors. Existing documents stay in place.
Check, then promote
promote/validate changes nothing and returns valid, errors and, per index, suggestions of inference services whose dimension matches. add_vectors creates new indexes during promotion (name, dimension, metric, optional inference_service). Map an index only to the model that produced its vectors. After promotion, change the retriever’s query to {"input_mode": "text", "value": "{{INPUT.q}}"} and pass text. Promotion is atomic and one-way: a managed namespace cannot return to standalone.

System collections

Mixpeek keeps some collections in every namespace for you. They answer filters, retrievers and alerts like any collection, and the _, mxp_ and mvs_bucket_ prefixes are reserved. Each mxp_ collection appears the first time a matching event happens. mxp_batch_failures, mxp_infra_metrics and mxp_healing_events have no writer today and stay empty. Namespaces older than a rename use mxp_evaluations and mxp_resources instead. For the ordered change feed, read GET /v1/events.

What goes wrong