Chat
Create rerank
Creates a rerank request.
POST
/
rerank
curl --request POST \
--url https://api.ap.siliconflow.com/v1/rerank \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "BAAI/bge-reranker-v2-m3",
"query": "Apple",
"documents": [
"apple",
"banana",
"fruit",
"vegetable"
],
"top_n": 4,
"return_documents": false,
"max_chunks_per_doc": 1024,
"overlap_tokens": 80
}'
{
"id": "<string>",
"results": [
{
"document": {
"text": "<string>"
},
"index": 123,
"relevance_score": 123
}
],
"tokens": {
"input_tokens": 123,
"output_tokens": 123
}
}
Authorizations
Use the following format for authentication: Bearer <your api key>
Body
application/json
Response
200
application/json
200
The response is of type object
.
curl --request POST \
--url https://api.ap.siliconflow.com/v1/rerank \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "BAAI/bge-reranker-v2-m3",
"query": "Apple",
"documents": [
"apple",
"banana",
"fruit",
"vegetable"
],
"top_n": 4,
"return_documents": false,
"max_chunks_per_doc": 1024,
"overlap_tokens": 80
}'
{
"id": "<string>",
"results": [
{
"document": {
"text": "<string>"
},
"index": 123,
"relevance_score": 123
}
],
"tokens": {
"input_tokens": 123,
"output_tokens": 123
}
}