curl --request POST \
--url https://api.myrouter.ai/openai/v1/rerank \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "<string>",
"query": "<string>",
"documents": [
"<string>"
],
"top_n": 123
}
'{
"id": "<string>",
"results": [
{
"document": {
"text": "<string>"
},
"index": 123,
"relevance_score": 123
}
],
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
}
}curl --request POST \
--url https://api.myrouter.ai/openai/v1/rerank \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "<string>",
"query": "<string>",
"documents": [
"<string>"
],
"top_n": 123
}
'{
"id": "<string>",
"results": [
{
"document": {
"text": "<string>"
},
"index": 123,
"relevance_score": 123
}
],
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
}
}Create a rerank request.Documentation Index
Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt
Use this file to discover all available pages before exploring further.
application/json