Skip to main content
Our rerank endpoint follows a Cohere-compatible request format at POST /v1/rerank. Here is an example of reranking documents: Parameters:
  • model: The model ID of the model you want to use
  • query: The search query or question to rank documents against
  • documents: The list of documents to rerank
  • top_n: The number of top ranked results to return (optional)
  • max_tokens_per_doc: Maximum number of tokens to consider per document (default: 4096)
Here is another example for semantic search ranking:
For deeper insights into the rerank endpoint, see our API reference.