Search knowledge
POST/v1/projects/:project_id/knowledge/search
Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — by the stored vector of an existing document or memory (similar_to_document_id, similar_to_memory_id), or by file paths, document IDs, memory store IDs, or tags. At least one of query, similar_to_document_id, similar_to_memory_id, tags, document_paths, document_ids, or memory_store_ids must be provided.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 413
- 429
- 500
- 502
- 503
- 4XX
Search results
Bad request — at least one search parameter is required, and a similar_to_* source takes neither query nor the other source
Unauthorized
Forbidden, or a query and no project in scope the caller holds embeddings:CreateEmbeddings on to bill its embedding to
The similar_to_* source does not exist or the caller cannot search it
SIMILARITY_SOURCE_NOT_EMBEDDED — the similar_to_* source has no embedding yet
REQUEST_REJECTED — the request body is over the size the body parser accepts
QUOTA_EXCEEDED — a requests quota on the calling API key or its project is spent for the window; Retry-After says when it reopens
Response Headers
Seconds until the quota window admits a request again
Unexpected server error — INTERNAL_ERROR, with the raw message never forwarded
The deployment's admission service is asked about this write and did not answer — ADMISSION_UNAVAILABLE; the write did not happen
EMBEDDING_NOT_CONFIGURED — the vector channel has no usable embedding provider; the search surfaces it rather than degrading to lexical only.
The deployment's admission service refused this write — answered under the service's own 4xx status, with its code (matching ^[A-Za-z_][A-Za-z0-9_]{0,63}$, not necessarily an ERROR_CODES key), message and meta; the write did not happen. A status this operation also declares on its own is documented there