Skip to main content
POST
Retrieve Knowledge Base

Authorizations

Authorization
string
header
required

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

Path Parameters

kb_id
string
required

Body

application/json

Request body for POST /knowledge-bases/{kb_id}/retrieve.

query is the user's text; the BE embeds it against the KB's saved embedding connection and runs a similarity search against the saved vector-store connection. top_k caps the number of matches returned.

query
string
required
Required string length: 1 - 4096
top_k
integer
default:5
Required range: 1 <= x <= 50

Response

Successful Response

Response envelope for KB retrieval — ordered list of matches.

matches
KbRetrieveMatch · object[]
required