input_schema, and runs a list of stages in order: a search, then filters, sorts, reducers and enrichments. You create it once and execute it with new inputs on every request. Each run returns documents, a status and a warnings array.
Create a retriever
This retriever runs one feature search over a collection namedproducts that uses the text extractor. It takes one input, query.
retriever_id as RETRIEVER_ID. If the feature_uri does not match an index in your collections, the error lists the available_feature_uris; copy one from there or from vector_indexes[].feature_uri on GET /v1/collections/{collection_id}. Full schema: Create retriever.
Execute a retriever
filters (merged with the stages’ filters), pagination, skip_cache and explain. See Execute retriever.
Read the response
Readdocuments, check status, and print warnings. A run that times out or skips a stage still answers HTTP 200, with status: "degraded" and an entry in warnings, so a short or empty documents can come from the degradation. A clean run returns status: "completed", and then an empty documents is a genuine no-match. Its warnings still carries one notice that the deprecated results field is no longer returned, unless you pass ?include_legacy_results=true; any other entry is a real problem.
A non-empty
interpretation.relaxations means a filter condition was dropped because its input was absent, so the results are broader than the filter you wrote. ignored_input_keys lists inputs no stage reads. The most common cause of an empty result is a wrong feature_uri.
Media URLs such as thumbnail_url and video_segment_url are signed per request and expire after 24 hours. Re-run the query for fresh ones instead of storing them.
Input schema
input_schema is a flat dict that maps each input name to its definition. Do not wrap it in a JSON Schema object such as {"type": "object", "properties": ...}; the API refuses that shape. Stages read inputs as {{INPUT.name}}.
There is no
vector type. Declare a precomputed embedding as array with items of type float: {"embedding": {"type": "array", "items": {"type": "float"}, "required": true}}. A feature_search query reads it with {"input_mode": "vector", "value": "{{INPUT.embedding}}"}.
An input name the retriever does not declare returns 400 before any stage runs, with accepted_fields in the error. A missing required input returns 422. session_id and user_id are accepted on every retriever without being declared.
Stages and templates
Each stage is{"stage_name", "stage_type", "config": {"stage_id", "parameters"}}. stage_name is your label, stage_id picks the stage, and stage_type is optional because the API infers it from stage_id. Stages lists every stage with its parameters.
Stage parameters accept Jinja2 templates with double braces. Namespaces are case-insensitive.
PATCH /v1/retrievers/{retriever_id} replaces the stage list on an unpublished retriever. A published retriever’s stages are fixed; clone it to change them.
Filters
A metadata filter is a tree ofAND, OR and NOT groups whose leaves are field/operator/value conditions. The same shape works in a stage’s pre_filters, in the execute body’s filters, in attribute_filter, and in conditional when blocks.
Filter for published video or audio that is not restricted
pre_filters, beside parameters inside config. The vector store applies it during the search. post_filters is accepted on every stage and never applied, so a predicate there returns unfiltered results with no warning.
Filtered fields need a payload index (keyword, integer, float, bool, datetime, text or geo), set in the namespace’s payload_indexes; see Namespaces. A filter on an unindexed field adds a warnings entry. System fields and _internal.* are indexed for you. A filter the API cannot compile returns 422 naming the node, for example AND[0].NOT[0].
Operators
Operators
String operators match without regard to case by default.
eq, ne, in and nin always compare exactly. In attribute_filter, set case_insensitive to make those compare without case too. A location is {"lat", "lon"} or a GeoJSON [lon, lat] array, longitude first.Lineage aliases
Lineage aliases
Templates and missing inputs
Templates and missing inputs
A value can be a template such as
{{INPUT.max_price}}. When the input is absent, the condition is removed, the run continues, and interpretation.relaxations plus warnings say so. A bare condition or a list of conditions is read as an AND group. An empty filter ({} or {"AND": []}) means no filter.Every _internal field you can filter on
Every _internal field you can filter on
Every _internal field
This table is generated from the server’s field registry, so it is the complete, authoritative set. If a name is not here, Mixpeek does not write it under _internal. Filter on the field / alias column; the storage path is shown so you can address a nested value explicitly.IdentityTimestamps
Lineage
System metadata
Blobs
Provenance
Tenancy
Access control
Pagination
Pass apagination object with a method on the execute request. Without it, the run uses cursor pagination sized to the pipeline’s final_top_k, or 10 when no stage declares one. limit is a shorthand for the page size.
offset takes page_size and page_number. An unknown key inside pagination returns 422 listing the valid keys. Pagination values do not accept templates.
Batch execution
POST /v1/retrievers/{retriever_id}/execute/batch runs up to 16 queries, each with its own inputs and filters, against one retriever. The retriever is planned once for the batch. concurrency (default 5, up to 20) sets the parallel runs. With "stream": true the results arrive as Server-Sent Events as each query finishes, tagged with query_index, and a keepalive comment every 15 seconds.
Execute three queries in one call
Execute without saving
POST /v1/retrievers/execute runs stages, collection_identifiers, input_schema and inputs in one call and stores no retriever. It accepts filters, pagination, limit and budget_limits. Use it to try a pipeline, then save the one that works. See Execute ad-hoc retriever.
Caching
Responses and stage outputs are cached with no setup. A response cache hit skips the whole pipeline and returnscached_at; a stage cache hit skips that stage and sets cache_hit in stage_statistics. Cache keys include each collection’s index signature, so new ingestion invalidates them.
Hit rates are at
GET /v1/analytics/retrievers/{retriever_id}/cache-performance.
Explain a run
Mixpeek rewrites your stage list before it runs: it pushes filters into the vector store, merges compatible stages and runs independent work in parallel. Write stages in the order that reads best.
See Explain retriever execution plan.
Write results to a collection
Addtarget_collection_id to an execute request to store each result as a document in that collection, with its fields, its stored vectors and lineage back to the execution. Running again into the same collection updates those documents in place. A collection can also fill itself from a saved retriever with a retriever_transform; see Collections and features.
Search as you type
GET /v1/retrievers/typeahead?q=wir&fields=metadata.brand returns prefix suggestions from field values, collection names and the caller’s recent searches. limit (default 10, up to 50) applies per source, so one response can hold 30 entries. At most 5 fields are read, and each needs a keyword index. A source that fails is named in warnings and the others still answer. See Typeahead.
Publish a retriever and add the search widget
POST /v1/retrievers/{retriever_id}/publish with a public_name gives the retriever a public URL and a slug. display_config on the retriever controls the hosted page’s inputs, result fields and layout. The @mixpeek/search-js React component searches a published retriever:
Install the search widget
Add the widget to a React app
projectKey is the public_name, or a ret_sk_ key together with a retrieverSlug prop. Users open it with Cmd+K or Ctrl+K. enableAIAnswer needs an agent_search or rag_prepare stage in the retriever. See Publish retriever and Apps for hosted search pages.
Related
- Stages: every stage, its parameters and an example
- Tune relevance: fusion, interactions, evaluations
- Monitoring and troubleshooting: retriever analytics and empty results
- Templates: deployable retrievers for common use cases

