Skip to main content
POST
Search file content via RAG-KAG and return scored snippets

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
query
string
required

The search query string.

Maximum string length: 500
Example:

"quantum gravity"

selectedUploadIds
string[] | null

Optional whitelist of upload ids. Intersected with the user's eligible scope; foreign / malformed ids are silently dropped.

Maximum array length: 5000
minScore
number<float>
default:0.1

Minimum dense (vector) score floor. Ignored for KAG-fused results.

Required range: 0 <= x <= 1
limit
integer
default:50

Maximum number of results to return.

Required range: 1 <= x <= 100

Response

Content-search results

success
boolean
Example:

true

query
string
Example:

"quantum gravity"

results
object[]
totalScanned
integer

Number of raw results returned by searchRag before the minScore filter.

uploadCount
integer

Number of distinct uploads in the user's searchable scope.

tookMs
integer

Server-side elapsed time in milliseconds (outer wall-clock incl. user/collection lookups).

searchPerf
object | null

Per-leg retrieval diagnostics (null when no fan-out ran — empty scope / RAG disabled / error).