Skip to content

REST API

Base URL:

https://mrhisearch.com/api/demo
  1. POST /token
  2. Save the returned token
  3. Send it back on all authenticated routes
Authorization: Bearer mrhi_demo__YOUR_TOKEN
content-type: application/json
authorization: Bearer mrhi_demo__YOUR_TOKEN
Terminal window
curl -X POST https://mrhisearch.com/api/demo/token
Terminal window
curl https://mrhisearch.com/api/demo/vectors/add \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{
"dimensions": 3,
"id": "doc-1",
"vector": [1, 0, 0],
"metadata": { "category": "news" }
}'
Terminal window
curl https://mrhisearch.com/api/demo/vectors/add-many \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{
"dimensions": 3,
"vectors": [
{ "id": "doc-1", "vector": [1, 0, 0], "metadata": { "category": "news" } },
{ "id": "doc-2", "vector": [0, 1, 0], "metadata": { "category": "sports" } }
]
}'

Optional add fields:

  • dimensions
  • metric: "cosine" or "l2"
Terminal window
curl https://mrhisearch.com/api/demo/search \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{
"queryVector": [1, 0, 0],
"topK": 3,
"candidatePool": 64,
"includeMetadata": true,
"filter": { "category": "news" }
}'
Terminal window
curl https://mrhisearch.com/api/demo/search-many \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{
"queryVectors": [
[1, 0, 0],
[0, 1, 0]
],
"topK": 2,
"includeMetadata": true
}'
Terminal window
curl https://mrhisearch.com/api/demo/session \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN'

Use this to inspect:

  • current dimension + metric
  • vector count
  • expiry time
  • remaining TTL
  • index stats

Get:

Terminal window
curl https://mrhisearch.com/api/demo/vectors/metadata/get \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{ "id": "doc-1" }'

Set:

Terminal window
curl https://mrhisearch.com/api/demo/vectors/metadata/set \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{ "id": "doc-1", "metadata": { "category": "updated" } }'

Delete:

Terminal window
curl https://mrhisearch.com/api/demo/vectors/metadata/delete \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{ "id": "doc-1" }'

Delete one:

Terminal window
curl https://mrhisearch.com/api/demo/vectors/delete \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{ "id": "doc-1" }'

Delete many:

Terminal window
curl https://mrhisearch.com/api/demo/vectors/delete-many \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN' \
-d '{ "ids": ["doc-1", "doc-2"] }'

Clear all vectors but keep the current configuration:

Terminal window
curl https://mrhisearch.com/api/demo/vectors/clear \
-X POST \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN'

Fully reset the index so the token can switch dimensions:

Terminal window
curl https://mrhisearch.com/api/demo/index/reset \
-X POST \
-H 'authorization: Bearer mrhi_demo__YOUR_TOKEN'

Most successful responses follow this pattern:

{
"success": true,
"session": {},
"metrics": {
"requestLatencyMs": 1.4
}
}

Depending on the route, the payload can also include:

  • token
  • usage
  • limits
  • results
  • stats
  • vector
  • vectors
  • metadata
  • has
  • mutation

Machine-readable schema:

https://mrhisearch.com/api/openapi

For the exact route list, request bodies, and route-by-route timing fields, see Endpoints.