Cohere Rerank
Rerank candidate documents with the Cohere-style request structure.
The Cohere Rerank API ranks candidate documents by relevance to a query. Its core request fields are similar to Jina Rerank, with additional support for X-Client-Name and max_tokens_per_doc. The response includes source indexes, relevance scores, a request ID, API version data, and billing metadata.
/v1/rerankCalculate the candidate document relevance score based on the query text and return the ranking result from high to low relevance. Core request fields are basically consistent with Jina Rerank, with additional support for X-Client-Name and max_tokens_per_doc; Successful responses include result index, relevance score, request identifier, API version, and billing metadata.
To achieve more stable sorting results, queries should be clear and specific, and documents should be concise and semantic. Long documents will be truncated according to max_tokens_per_doc; It is recommended to request no more than 1,000 documents per request, and structured data should be converted to YAML strings
Authorization
bearerAuth Use Bearer your-api-key in the Authorization Header.
In: header
Header Parameters
Name of the project to be requested.
Request Body
application/json
Cohere-style document reranking request parameters.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json