Authorization: Bearer ********************curl --location 'https://api.key4u.vn/v1/rerank' \
--header 'Accept: application/json' \
--header 'X-Forwarded-Host: localhost:5173' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"documents": [
"Text ranking models are widely used in search engines and recommendation systems, where they rank candidate texts based on textual relevance.",
"Quantum computing is a frontier field in computer science.",
"The development of pretrained language models has brought new advances to text ranking models."
],
"instruct": "Given a web search query, retrieve relevant passages that answer the query.",
"model": "qwen3-rerank",
"query": "What Is a Text Ranking Model?",
"top_n": 2
}'{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "\n\nHello there, how may I assist you today?",
"role": "assistant"
}
}
],
"created": 1677652288,
"id": "chatcmpl-123",
"object": "chat.completion",
"usage": {
"completion_tokens": 12,
"prompt_tokens": 9,
"total_tokens": 21
}
}