Skip to main content
POST
/
v1
/
rerank
Rerank Documents
curl --request POST \
  --url https://api.ldx.dev/v1/rerank \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "rerank-english-v2.0",
  "query": "<string>",
  "documents": [
    "<string>"
  ],
  "top_n": 123,
  "return_documents": false
}
'
{
  "id": "<string>",
  "results": [
    {
      "index": 123,
      "relevance_score": 123,
      "document": {}
    }
  ],
  "meta": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.liandanxia.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json
model
string
required
Example:

"rerank-english-v2.0"

query
string
required

See endpoint details.

documents
(string | object)[]
required

See endpoint details.

top_n
integer

See endpoint details.

return_documents
boolean
default:false

Response

200 - application/json

See endpoint details.

id
string
results
object[]
meta
object