Score and reorder a list of documents by relevance to a query using reranker models.
Reranking takes a query and a list of candidate documents, then returns them sorted by relevance. It is the second stage in a typical RAG pipeline — retrieve broadly with a vector search, then rerank the top-k results for precision.
The response returns results sorted by relevance_score descending. index maps back to the original position in your documents array.
| Parameter | Description |
|---|---|
model | Reranker model slug. |
query | The search query. |
documents | List of strings to score. Max 1,000 per request. |
top_n | Return only the top N results. Omit to return all. |
return_documents | Include the original text in results. Default true. |
Reranking is billed per document scored (not per token) at a flat DA rate per document. Rates appear in the catalog at launch.