Skip to main content
POST
/
v1
/
retrievers
Create Retriever
curl --request POST \
  --url https://api.mixpeek.com/v1/retrievers \
  --header 'Content-Type: application/json' \
  --data '{
  "retriever_name": "product_search_v1",
  "description": "CLIP + metadata prefiltering",
  "input_schema": {
    "properties": {}
  },
  "collection_ids": [
    "col_products_v1"
  ],
  "stages": [
    {
      "stage_name": "<string>",
      "version": "<string>",
      "parameters": {},
      "pre_filters": {
        "AND": [
          {
            "field": "name",
            "operator": "eq",
            "value": "John"
          },
          {
            "field": "age",
            "operator": "gte",
            "value": 30
          }
        ],
        "OR": [
          {
            "field": "status",
            "operator": "eq",
            "value": "active"
          },
          {
            "field": "role",
            "operator": "eq",
            "value": "admin"
          }
        ],
        "NOT": [
          {
            "field": "department",
            "operator": "eq",
            "value": "HR"
          },
          {
            "field": "location",
            "operator": "eq",
            "value": "remote"
          }
        ],
        "case_sensitive": true
      },
      "post_filters": {
        "AND": [
          {
            "field": "name",
            "operator": "eq",
            "value": "John"
          },
          {
            "field": "age",
            "operator": "gte",
            "value": 30
          }
        ],
        "OR": [
          {
            "field": "status",
            "operator": "eq",
            "value": "active"
          },
          {
            "field": "role",
            "operator": "eq",
            "value": "admin"
          }
        ],
        "NOT": [
          {
            "field": "department",
            "operator": "eq",
            "value": "HR"
          },
          {
            "field": "location",
            "operator": "eq",
            "value": "remote"
          }
        ],
        "case_sensitive": true
      }
    }
  ],
  "metadata": {}
}'
{
  "retriever_id": "<string>",
  "retriever_name": "<string>",
  "description": "<string>",
  "input_schema": {
    "properties": {}
  },
  "collection_ids": [
    "<string>"
  ],
  "stages": [
    {
      "stage_name": "<string>",
      "version": "<string>",
      "parameters": {},
      "pre_filters": {
        "AND": [
          {
            "field": "name",
            "operator": "eq",
            "value": "John"
          },
          {
            "field": "age",
            "operator": "gte",
            "value": 30
          }
        ],
        "OR": [
          {
            "field": "status",
            "operator": "eq",
            "value": "active"
          },
          {
            "field": "role",
            "operator": "eq",
            "value": "admin"
          }
        ],
        "NOT": [
          {
            "field": "department",
            "operator": "eq",
            "value": "HR"
          },
          {
            "field": "location",
            "operator": "eq",
            "value": "remote"
          }
        ],
        "case_sensitive": true
      },
      "post_filters": {
        "AND": [
          {
            "field": "name",
            "operator": "eq",
            "value": "John"
          },
          {
            "field": "age",
            "operator": "gte",
            "value": 30
          }
        ],
        "OR": [
          {
            "field": "status",
            "operator": "eq",
            "value": "active"
          },
          {
            "field": "role",
            "operator": "eq",
            "value": "admin"
          }
        ],
        "NOT": [
          {
            "field": "department",
            "operator": "eq",
            "value": "HR"
          },
          {
            "field": "location",
            "operator": "eq",
            "value": "remote"
          }
        ],
        "case_sensitive": true
      }
    }
  ]
}

Headers

Authorization
string | null

Bearer token authentication using your API key. Format: 'Bearer your_api_key'. To get an API key, create an account at mixpeek.com/start and generate a key in your account settings. Example: 'Bearer sk_1234567890abcdef'

X-Namespace
string | null

Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.

Body

application/json

The retriever creation request.

retriever_name
string
required

Human-readable retriever name

Examples:

"product_search_v1"

input_schema
object
required

Schema defining the expected input format

collection_ids
string[]
required

List of collection IDs to search in

Examples:
["col_products_v1"]
stages
StageInstanceConfig · object[]
required

List of stages to execute in order

description
string | null

Description of the retriever

Examples:

"CLIP + metadata prefiltering"

metadata
object

Response

Successful Response

Retriever model.

retriever_name
string
required

Name of the retriever

input_schema
object
required

Input schema for the retriever

collection_ids
string[]
required

List of collection IDs

stages
StageInstanceConfig · object[]
required

List of stage configurations

retriever_id
string

Unique identifier for the retriever

description
string | null

Description of the retriever