REST API
Base URL:
https://mrhisearch.com/api/demoAuthentication
Section titled “Authentication”POST /token- Save the returned token
- Send it back on all authenticated routes
Authorization: Bearer mrhi_demo__YOUR_TOKENCommon headers
Section titled “Common headers”content-type: application/jsonauthorization: Bearer mrhi_demo__YOUR_TOKENCreate a token
Section titled “Create a token”curl -X POST https://mrhisearch.com/api/demo/tokenAdd one vector
Section titled “Add one vector”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" } }'Add many vectors
Section titled “Add many vectors”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:
dimensionsmetric:"cosine"or"l2"
Search one query vector
Section titled “Search one query vector”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" } }'Search many query vectors
Section titled “Search many query vectors”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 }'Inspect session state
Section titled “Inspect session state”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
Metadata routes
Section titled “Metadata routes”Get:
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:
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:
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 / clear / reset
Section titled “Delete / clear / reset”Delete one:
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:
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:
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:
curl https://mrhisearch.com/api/demo/index/reset \ -X POST \ -H 'authorization: Bearer mrhi_demo__YOUR_TOKEN'Response shape
Section titled “Response shape”Most successful responses follow this pattern:
{ "success": true, "session": {}, "metrics": { "requestLatencyMs": 1.4 }}Depending on the route, the payload can also include:
tokenusagelimitsresultsstatsvectorvectorsmetadatahasmutation
OpenAPI
Section titled “OpenAPI”Machine-readable schema:
https://mrhisearch.com/api/openapiFor the exact route list, request bodies, and route-by-route timing fields, see Endpoints.