Rank documents by relevance
rerankRead-onlyIdempotent
Orders up to 100 documents by relevance to a query through POST /v1/rerank with a rerank model id from list_models (type rerank): each result's index into documents, its score and its text, best first. Billed per input token to the key in the MCP request's Authorization header.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | A rerank model id from list_models (type rerank). | |
| query | Yes | What the documents are ranked against. | |
| top_n | No | How many to return, best first. Default: all. | |
| documents | Yes | Up to 100 texts to rank. |