Reorder search results by relevance with our specialized reranking API
Parameter | Type | Required | Description |
---|---|---|---|
model | string | Yes | The model ID to use for reranking. Use morph-rerank-v1 . |
query | string | Yes | The search query to compare documents against. |
documents | array | No* | An array of document strings to be reranked. Required if embedding_ids is not provided. |
embedding_ids | array | No* | An array of embedding IDs to rerank. Required if documents is not provided. Remote content storage must be enabled. |
top_n | integer | No | Number of top results to return. Default is all documents. |
documents
or embedding_ids
must be provided.