Skip to main content
POST
Retrieve Chunks from a Knowledge Base / Test Retrieval

Authorizations

Authorization
string
header
required

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path Parameters

dataset_id
string<uuid>
required

Knowledge base ID, from List Knowledge Bases.

Body

application/json
query
string
required

Search query text.

Maximum string length: 250
retrieval_model
object

Retrieval model configuration. Controls how chunks are searched and ranked when querying this knowledge base.

attachment_ids
string[] | null

List of attachment IDs to include in the retrieval context.

external_retrieval_model
object

Retrieval settings for external knowledge bases.

Response

Retrieval results.

query
object

The original query object.

records
object[]

List of matched retrieval records.