---
title: "Semantic search by vector: the query text never reaches the server"
method: POST
path: "/v1/memories/search"
tags: ["Memories"]
---

# Semantic search by vector: the query text never reaches the server

`POST /v1/memories/search`

## Request

- Base URL: `https://api.chainmemory.ai`
- URL: `https://api.chainmemory.ai/v1/memories/search`
- Auth: API key in header `x-api-key`

Same ranking and the same memories as GET (both use one scoring function), but the client sends the query's vector in the body instead of its text. The server never sees the query and logs only that a vector search happened. Sealed matches come back with `scheme: sealed`, `summary: null` and their `blob_b64`, so the client decrypts them without another request. Since 2026-09-21.

## Request body

- object
  - `query_embedding` number[], required: 384 numbers, L2-normalized (norm 1, tolerance 0.001): the all-MiniLM-L6-v2 vector computed on the client, [CLS] + up to 254 tokens + [SEP], mean pooling
  - `limit` integer: 1-20, default 10

## Response `200`

Matches with a relevance score

## Other responses

- `400`: `query_embedding invalido: …` — not an array of 384 finite numbers with norm 1

---

[API](https://skmtc.dev/chainmemory/apis/chainmemory-api.md) · [All operations](https://skmtc.dev/chainmemory/apis/chainmemory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chainmemory/apis/chainmemory-api/revisions/5331e0f0b6af?raw)
