创建重排序请求
Creates a rerank request.
http
POST https://api.woagent.net/rerankAuthorizations
Authorization string header required
Use the following format for authentication: Bearer <your api key>
Body
application/json
model enum<string> required
Corresponding Model Name. To better enhance service quality, we will make periodic changes to the models provided by this service, including but not limited to model on/offlining and adjustments to model service capabilities. We will notify you of such changes through appropriate means such as announcements or message pushes where feasible.
Available options: Qwen/Qwen3-Reranker-8B, Qwen/Qwen3-Reranker-4B, Qwen/Qwen3-Reranker-0.6B, BAAI/bge-reranker-v2-m3, Pro/BAAI/bge-reranker-v2-m3, netease-youdao/bce-reranker-base_v1
Example: "BAAI/bge-reranker-v2-m3"
query string required
Required. The search query.
Example: "Apple"
documents string[] required
Currently, only string lists are supported. Document objects will be supported in the future.
Minimum length: 1
Example:
json
["apple", "banana", "fruit", "vegetable"]instruction string
The instruction for the reranker, only support Qwen/Qwen3-Reranker-8B, Qwen/Qwen3-Reranker-4B,Qwen/Qwen3-Reranker-0.6B.
Example: "Please rerank the documents based on the query."
top_n integer
Number of most relevant documents or indices to return.
Example: 4
return_documents boolean
If false, the response does not include document text; if true, it includes the input document text.
max_chunks_per_doc integer
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. only BAAI/bge-reranker-v2-m3, Pro/BAAI/bge-reranker-v2-m3, netease-youdao/bce-reranker-base_v1 support this field.
overlap_tokens integer
Number of token overlaps between adjacent chunks when documents are chunked. only BAAI/bge-reranker-v2-m3, Pro/BAAI/bge-reranker-v2-m3, netease-youdao/bce-reranker-base_v1 support this field.
Required range: x <= 80
Response
200 application/json
200
id string required
results object[] required
Hide child attributes
document object
Original document content.
- document.text
string
index integer
The index value of the position in the input candidate doc array.
relevance_score number
Similarity score.
tokens object required
Hide child attributes
tokens.input_tokens integer
tokens.output_tokens integer