Rerank

Rerank sorts text inputs by semantic relevance to a specified query.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
modelstringRequired
The model to use for reranking.
querystringRequired
The query to rank against.
documentslist of stringsRequired
Array of documents to rank.
return_documentsbooleanOptional
Boolean setting whether to return documents in output.

Response

Successful response.
idstring or null
Unique ID for the rerank response.
objectstring or null

Type of object (list).

createdinteger or null
Timestamp of when the rerank response was created.
modelstring or null
The rerank model used.
resultslist of objects or null
The set of rankings.

Errors