/v1/rerank endpoint takes a query string and a list of candidate documents, and returns them sorted by relevance to the query. Reranking is typically used as a second-pass filter after a fast initial retrieval step — for example, after a vector similarity search in a RAG pipeline — to improve the quality of the top results passed to a language model.
OpenOpen8’s rerank endpoint is compatible with both the Cohere Rerank API format and the Jina Rerank API format.
POST /v1/rerank
Request body
The reranking model to use. For example,
rerank-english-v3.0 (Cohere) or jina-reranker-v2-base-multilingual (Jina). The available models depend on your configured channels.The search query to rank the documents against.
The list of documents to rank. Each element can be a plain string, or an object with a
text field containing the document text.The number of top-ranked results to return. If omitted, all documents are returned sorted by relevance score.
If
true, each result includes the original document text in addition to the index and relevance score. Defaults to false.Maximum number of chunks per document when the provider splits long documents internally.
Number of overlapping tokens between chunks when the provider splits long documents.
Response
Ranked list of document results, ordered from most to least relevant.
Token usage for the request.
Example
Example response
Supported providers
| Provider | Example models |
|---|---|
| Cohere | rerank-english-v3.0, rerank-multilingual-v3.0 |
| Jina | jina-reranker-v2-base-multilingual, jina-reranker-v1-base-en |