Skip to navigation

Rerank

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

Authentication

AuthorizationBearer

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.
idstringOptional
Unique ID for the rerank response.
objectstringOptional

Type of object (list).

createdintegerOptional
Timestamp of when the rerank response was created.
modelstringOptional
The rerank model used.
resultslist of objectsOptional
The set of rankings.

Errors

400
Bad Request Error
403
Forbidden Error