v1

latestOpenAPI 3.0.0MIT2026-07-14738120.4 KB
Rerank

Create Rerank

Creates a rerank request.

post/rerank

Request body

model'BAAI/bge-reranker-v2-m3' | 'netease-youdao/bce-reranker-base_v1' required

Specifies the model to be used.

querystring required

Required. The search query.

documentsstring[] required

Required. List of documents to be reordered. If document objects are provided, the 'text' field is mandatory, and other fields will be preserved in the response.

top_ninteger

Number of most relevant documents or indices to return.

return_documentsboolean

If false, the response does not include document text; if true, it includes the input document text.

max_chunks_per_docinteger

Maximum number of chunks generated from within a document. Long documents are divided into multiple chunks for calculation, and the highest score among the chunks is taken as the document's score.

overlap_tokensinteger

Number of token overlaps between adjacent chunks when documents are chunked.

Example request

{
  "model": "BAAI/bge-reranker-v2-m3",
  "query": "Apple",
  "documents": [
    "苹果",
    "香蕉",
    "水果",
    "蔬菜"
  ],
  "top_n": 4
}

Response

200

idstring required