POST /v1/data/ai/rerank/run
Pricing: Metered: you pay exactly each call’s cost at the selected model’s rates (default Cohere: Rerank v3.5: the model’s own rate).
Request
Send the inputs underparams. Only the keys below are accepted; any other key returns 422 invalid_params.
The search query, or several queries; each is ranked against the same documents and is one call.
The rerank model. Pick from the list (popular models first). Each model shows its own rate (per search, or per 1M tokens), and that is exactly what each call costs.Allowed values:
cohere/rerank-v3.5 (Cohere: Rerank v3.5), cohere/rerank-5-fast (Cohere: Rerank 5 Fast), cohere/rerank-5-pro (Cohere: Rerank 5 Pro), cohere/rerank-4-pro (Cohere: Rerank 4 Pro), mongodb/rerank-3-lite (VoyageAI by MongoDB: rerank-3-lite), mongodb/rerank-3 (VoyageAI by MongoDB: rerank-3), qwen/qwen3-reranker-0.6b (Qwen3 Reranker 0.6B), cohere/rerank-4-fast (Cohere: Rerank 4 Fast), qwen/qwen3-reranker-8b (Qwen3 Reranker 8B), mongodb/rerank-2.5 (VoyageAI by MongoDB: rerank-2.5), mongodb/rerank-2.5-lite (VoyageAI by MongoDB: rerank-2.5-lite).Return only the best N documents for each query. Leave empty to rank them all.Min
1; max 1000.Example
Response fields
Each row indata is one ranked document, keyed by these fields.