Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

query
string
required

Natural-language search query.

mode
enum<string>
default:text

Retrieval pipeline: "text" (hybrid search on DocumentChunk) or "vision" (image-based on VisionChunk).

  • text - text
  • vision - vision
Available options:
text,
vision
top_k
integer
default:20

Number of chunks retrieved from the vector store before reranking. Range: 1–100.

Required range: 1 <= x <= 100
top_n
integer
default:10

Number of chunks returned after filtering. Range: 1–50. Must be ≤ top_k.

Required range: 1 <= x <= 50
workspace_id
integer[]

Scope retrieval to specific workspace IDs (authorized only).

file_id
integer[]

Scope retrieval to specific file IDs (authorized only).

tag_id
integer[]

Scope retrieval to documents with any of these tag IDs (company-scoped).

skip_rerank
boolean
default:false

Skip reranking. Useful to isolate retrieval quality.

include_image
boolean
default:false

Include base64-encoded page image in each result.

Response

Chunks retrieved successfully. Empty array if no documents match.

query
string
required

The search query that was executed.

retrieve_params
object
required

Retrieval parameters used (including defaults).

scoping_params
object
required

Scoping parameters used to narrow retrieval.

results
object[]
required

Retrieved chunks with context