Submit a rerank request
Submits a rerank request to the rerank router
Authorizations
API key as bearer token in Authorization header
Body
Rerank request input
The list of documents to rerank. Documents may be plain strings, or structured objects with text and/or image for multimodal models.
1A document to rerank. Either a plain string, or a structured object with optional text and/or image.
[
"Paris is the capital of France.",
"Berlin is the capital of Germany."
]The rerank model to use
"cohere/rerank-v3.5"
The search query to rerank documents against
"What is the capital of France?"
Provider routing preferences for the request.
{ "allow_fallbacks": true }Number of most relevant documents to return
x >= 13
Response
Rerank response
Rerank response containing ranked results
The model used for reranking
"cohere/rerank-v3.5"
List of rerank results sorted by relevance
[
{
"document": { "text": "Paris is the capital of France." },
"index": 0,
"relevance_score": 0.98
}
]Unique identifier for the rerank response (ORID format)
"gen-rerank-1234567890-abc"
The provider that served the rerank request
"Cohere"
Usage statistics
{ "search_units": 1, "total_tokens": 150 }