Rerank
Rerank
Rerank
POST /v1/rerank — the document reranking endpoint
POST
Rerank
Re-rank a set of candidate documents by relevance to a query, commonly used for precise ranking after RAG recall.
Fully compatible with the Cohere / Jina Rerank protocol.
Request
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | ✅ | Rerank model ID |
query | string | ✅ | The query string |
documents | array | ✅ | Array of documents, either strings or { text } objects |
top_n | integer | Return the top N, default all | |
return_documents | boolean | Whether to return the original text in the response (default false, returning only index + score) | |
max_chunks_per_doc | integer | Cohere v3, chunk overly long documents |
Recommended models
| Model ID | Vendor | Context |
|---|---|---|
rerank-multilingual-v3.0 | Cohere | 4096 |
rerank-english-v3.0 | Cohere | 4096 |
jina-reranker-v2-base-multilingual | Jina | 1024 |
bge-reranker-v2-m3 | BAAI | 8192 |
bge-reranker-large | BAAI | 512 |
Response
results is sorted descending by relevance_score, and index points to the position in the original documents array.
Python (raw HTTP)
Cohere SDK
Billing
Charged by the total tokens ofquery + all documents; the specific multiplier depends on the model.