Knowledge Base
Search
Semantic search over the workspace's knowledge base (cosine similarity, best first).
API key access
Needs the
kb:read scope with an API key (ro_pat_...). A signed-in session uses the caller's role.GET
/api/v1/kb/searchAuthorizationBearer <token>
Access token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).
In: header
Query Parameters
qQ
Search query
Length
1 <= length <= 2000limit?Limit
Default
5Range
1 <= value <= 20min_score?Min Score
Header Parameters
X-Workspace-Id?X-Workspace-Id
Id of the workspace to act on (must be a member).
Response Body
curl -X GET "http://localhost:8000/api/v1/kb/search?q=string&limit=5&min_score=-1" \ -H "X-Workspace-Id: string"{
"query": "string",
"results": [
{
"chunk_id": "55e808e1-8ddc-49f1-92c9-6bbdcdff1c83",
"document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
"document_title": "string",
"source_url": "string",
"chunk_index": 0,
"content": "string",
"score": 0
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}