OpenAPI 3.1.0raw.githubusercontent.com2026-08-142585163.2 MB

deb8d376faee

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 nullable

The number of results to return. Send null or omit to use the knowledge base configured top_k.

thresholdnumber nullable

The threshold to apply to the search. Send null or omit to use the knowledge base configured threshold

search_type'vector_search' | 'keyword_search' | 'hybrid_search' | 'null' nullable

The type of search to perform. Send null or omit to use the knowledge base configured retrieval_type

Example request

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

Response

Search knowledge base