curl --request POST \
--url https://api.vivgrid.com/v1/rerank \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "BAAI/bge-reranker-base",
"query": "What is fast text search?",
"documents": [
"Text search indexes terms for fast lookup.",
"Weather today is sunny."
],
"top_n": 1
}
'{
"results": [
{
"index": 123,
"relevance_score": 123,
"document": "<string>"
}
],
"object": "<string>",
"model": "<string>"
}Re-ranks a list of documents against a query using an embedding/rerank model.
curl --request POST \
--url https://api.vivgrid.com/v1/rerank \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "BAAI/bge-reranker-base",
"query": "What is fast text search?",
"documents": [
"Text search indexes terms for fast lookup.",
"Weather today is sunny."
],
"top_n": 1
}
'{
"results": [
{
"index": 123,
"relevance_score": 123,
"document": "<string>"
}
],
"object": "<string>",
"model": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
BAAI/bge-reranker-base.
Query to rank documents against.
List of documents to rerank.
Number of top documents to return.
x >= 1Whether to include document text in the response.
End-user identifier.