Skip to main content
POST
/
v1
/
rerank
Rerank candidate documents
curl --request POST \
  --url https://api.sharc.dev/v1/rerank \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "documents": [
    "<string>"
  ]
}
'
{
  "results": [
    {
      "index": 123,
      "relevance_score": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Pass your key in Authorization: Bearer .

Body

application/json
query
string
required
documents
(string | object)[]
required
Maximum array length: 1000

Response

Rerank results

results
object[]
required