POST
/
rerank

Authorizations

Authorization
string
headerrequired

Use the following format for authentication: Bearer <your api key>

Body

application/json
model
enum<string>
required

对应的模型名称。为更好的提升服务质量,我们将不定期对本服务提供的模型做相关变更,包括但不限于模型上下线,模型服务能力调整,我们会在可行的情况下以公告、消息推送等适当的方式进行通知。

Available options:
BAAI/bge-reranker-v2-m3,
netease-youdao/bce-reranker-base_v1
query
string
default: Applerequired

Required. The search query.

documents
string[]
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_n
integer

Number of most relevant documents or indices to return.

return_documents
boolean
default: false

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

max_chunks_per_doc
integer
default: 1024

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_tokens
integer
default: 80

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

Required range: x < 80

Response

200 - application/json
id
string
required
results
object[]
required
results.document
object

Original document content.

results.document.text
string
results.index
integer

The index value of the position in the input candidate doc array.

results.relevance_score
number

Similarity score.

tokens
object
required
tokens.input_tokens
integer
tokens.output_tokens
integer