Rerank a list of documents by relevance to a query
Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
or
Body Params application/jsonRequired
{
"model": "rerank-english-v2.0",
"query": "string",
"documents": [
"string"
],
"top_n": 0,
"return_documents": false
}
Request Code Samples
curl --location '/v1/rerank' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "rerank-english-v2.0",
"query": "string",
"documents": [
"string"
],
"top_n": 0,
"return_documents": false
}'
Responses
Reranking completed successfully
{
"id": "string",
"results": [
{
"index": 0,
"relevance_score": 0,
"document": {}
}
],
"meta": {}
}
Modified at 2026-05-23 05:25:15