v172

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0826148911.7 MB
Knowledge Bases

Search knowledge base

Search a Knowledge Base and return the most similar chunks, along with their search and rerank scores. Note that all configuration changes made in the API will override the settings in the UI.

post/v2/knowledge/{knowledge_id}/search

Path parameters

knowledge_idstring required

The unique identifier or key of the knowledge base

The unique identifier or key of the knowledge base

Request body

querystring required

The query to use to search the knowledge base

top_kinteger

The number of results to return. If not provided, will default to the knowledge base configured top_k.

thresholdnumber

The threshold to apply to the search. If not provided, will default to the knowledge base configured threshold

search_type'vector_search' | 'keyword_search' | 'hybrid_search'

The type of search to perform. If not provided, will default to the knowledge base configured retrieval_type

Example request

{
  "rerank_config": {
    "model": "cohere/rerank-multilingual-v3.0"
  }
}

Response

Search knowledge base